Reduce minSdkVersion to 16, fix issues reported by lint
				
					
				
			This further reduces the minimum API level to 16, which should encompass most users stuck on older versions of Android (mainly BlackBerry OS and Jolla users). Several issues reported by code analysis were fixed, mainly around issues with layouts.
This commit is contained in:
		
							parent
							
								
									08529041a5
								
							
						
					
					
						commit
						aaf5fa816b
					
				| @ -73,7 +73,7 @@ android { | ||||
|     compileSdkVersion 28 | ||||
| 
 | ||||
|     defaultConfig { | ||||
|         minSdkVersion 18 | ||||
|         minSdkVersion 16 | ||||
|         targetSdkVersion 28 | ||||
|         versionCode 307 | ||||
|         versionName "2.3.9" | ||||
|  | ||||
| @ -65,7 +65,9 @@ public class Resolver { | ||||
|             final Field useHardcodedDnsServers = DNSClient.class.getDeclaredField("useHardcodedDnsServers"); | ||||
|             useHardcodedDnsServers.setAccessible(true); | ||||
|             useHardcodedDnsServers.setBoolean(dnsClient, false); | ||||
|         } catch (NoSuchFieldException | IllegalAccessException e) { | ||||
|         } catch (NoSuchFieldException e) { | ||||
|             Log.e(Config.LOGTAG, "Unable to disable hardcoded DNS servers", e); | ||||
|         } catch (IllegalAccessException e) { | ||||
|             Log.e(Config.LOGTAG, "Unable to disable hardcoded DNS servers", e); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -48,14 +48,17 @@ | ||||
|                                 android:layout_height="@dimen/avatar_on_details_screen_size" | ||||
|                                 android:layout_alignParentStart="true" | ||||
|                                 app:riv_corner_radius="2dp" | ||||
|                                 android:layout_marginEnd="@dimen/avatar_item_distance"/> | ||||
|                                 android:layout_marginEnd="@dimen/avatar_item_distance" | ||||
|                                 android:layout_alignParentLeft="true" | ||||
|                                 android:layout_marginRight="@dimen/avatar_item_distance" /> | ||||
| 
 | ||||
|                             <LinearLayout | ||||
|                                 android:layout_width="fill_parent" | ||||
|                                 android:layout_height="wrap_content" | ||||
|                                 android:layout_alignParentTop="true" | ||||
|                                 android:layout_toEndOf="@+id/your_photo" | ||||
|                                 android:orientation="vertical"> | ||||
|                                 android:orientation="vertical" | ||||
|                                 android:layout_toRightOf="@+id/your_photo"> | ||||
| 
 | ||||
|                                 <RelativeLayout | ||||
|                                     android:layout_width="match_parent" | ||||
| @ -67,7 +70,9 @@ | ||||
|                                         android:layout_height="wrap_content" | ||||
|                                         android:layout_alignParentStart="true" | ||||
|                                         android:layout_toStartOf="@+id/edit_muc_name_button" | ||||
|                                         android:orientation="vertical"> | ||||
|                                         android:orientation="vertical" | ||||
|                                         android:layout_alignParentLeft="true" | ||||
|                                         android:layout_toLeftOf="@+id/edit_muc_name_button"> | ||||
| 
 | ||||
|                                         <TextView | ||||
|                                             android:id="@+id/muc_title" | ||||
| @ -91,7 +96,9 @@ | ||||
|                                         android:layout_alignParentStart="true" | ||||
|                                         android:layout_toStartOf="@+id/edit_muc_name_button" | ||||
|                                         android:orientation="vertical" | ||||
|                                         android:visibility="gone"> | ||||
|                                         android:visibility="gone" | ||||
|                                         android:layout_alignParentLeft="true" | ||||
|                                         android:layout_toLeftOf="@+id/edit_muc_name_button"> | ||||
| 
 | ||||
|                                         <android.support.design.widget.TextInputLayout | ||||
|                                             android:layout_width="match_parent" | ||||
| @ -132,7 +139,8 @@ | ||||
|                                         android:alpha="?attr/icon_alpha" | ||||
|                                         android:background="?attr/selectableItemBackgroundBorderless" | ||||
|                                         android:padding="@dimen/image_button_padding" | ||||
|                                         android:src="?attr/icon_edit_body"/> | ||||
|                                         android:src="?attr/icon_edit_body" | ||||
|                                         android:layout_alignParentRight="true" /> | ||||
|                                 </RelativeLayout> | ||||
|                             </LinearLayout> | ||||
|                         </RelativeLayout> | ||||
| @ -151,7 +159,8 @@ | ||||
|                                 android:layout_toStartOf="@+id/change_conference_button" | ||||
|                                 android:text="@string/private_conference" | ||||
|                                 android:textAppearance="@style/TextAppearance.Conversations.Body1" | ||||
|                                 /> | ||||
|                                 android:layout_alignParentLeft="true" | ||||
|                                 android:layout_toLeftOf="@+id/change_conference_button" /> | ||||
| 
 | ||||
|                             <ImageButton | ||||
|                                 android:id="@+id/change_conference_button" | ||||
| @ -164,7 +173,8 @@ | ||||
|                                 android:alpha="?attr/icon_alpha" | ||||
|                                 android:background="?attr/selectableItemBackgroundBorderless" | ||||
|                                 android:padding="@dimen/image_button_padding" | ||||
|                                 android:src="?attr/icon_settings"/> | ||||
|                                 android:src="?attr/icon_settings" | ||||
|                                 android:layout_alignParentRight="true" /> | ||||
|                         </RelativeLayout> | ||||
| 
 | ||||
|                         <TableLayout | ||||
| @ -193,7 +203,8 @@ | ||||
|                                     android:layout_height="wrap_content" | ||||
|                                     android:layout_gravity="end" | ||||
|                                     android:paddingStart="4dp" | ||||
|                                     android:textAppearance="@style/TextAppearance.Conversations.Body1"/> | ||||
|                                     android:textAppearance="@style/TextAppearance.Conversations.Body1" | ||||
|                                     android:paddingLeft="4dp" /> | ||||
|                             </TableRow> | ||||
| 
 | ||||
|                         </TableLayout> | ||||
| @ -302,7 +313,8 @@ | ||||
|                                 android:alpha="?attr/icon_alpha" | ||||
|                                 android:background="?attr/selectableItemBackgroundBorderless" | ||||
|                                 android:padding="@dimen/image_button_padding" | ||||
|                                 android:src="?attr/icon_edit_body"/> | ||||
|                                 android:src="?attr/icon_edit_body" | ||||
|                                 android:layout_alignParentRight="true" /> | ||||
|                         </RelativeLayout> | ||||
| 
 | ||||
|                         <RelativeLayout | ||||
| @ -318,7 +330,8 @@ | ||||
|                                 android:layout_toStartOf="@+id/notification_status_button" | ||||
|                                 android:text="@string/notify_on_all_messages" | ||||
|                                 android:textAppearance="@style/TextAppearance.Conversations.Body1" | ||||
|                                 /> | ||||
|                                 android:layout_alignParentLeft="true" | ||||
|                                 android:layout_toLeftOf="@+id/notification_status_button" /> | ||||
| 
 | ||||
|                             <ImageButton | ||||
|                                 android:id="@+id/notification_status_button" | ||||
| @ -331,7 +344,8 @@ | ||||
|                                 android:alpha="?attr/icon_alpha" | ||||
|                                 android:background="?attr/selectableItemBackgroundBorderless" | ||||
|                                 android:padding="@dimen/image_button_padding" | ||||
|                                 android:src="?attr/icon_notifications"/> | ||||
|                                 android:src="?attr/icon_notifications" | ||||
|                                 android:layout_alignParentRight="true" /> | ||||
|                         </RelativeLayout> | ||||
| 
 | ||||
|                         <TextView | ||||
|  | ||||
| @ -29,7 +29,8 @@ | ||||
|                     android:layout_margin="16dp" | ||||
|                     app:backgroundTint="?colorPrimary" | ||||
|                     android:contentDescription="@string/action_unfix_from_location" | ||||
|                     android:src="?attr/icon_gps_fixed"/> | ||||
|                     android:src="?attr/icon_gps_fixed" | ||||
|                     android:layout_alignParentRight="true" /> | ||||
| 
 | ||||
| 
 | ||||
|             <org.osmdroid.views.MapView | ||||
|  | ||||
| @ -28,6 +28,7 @@ | ||||
|             android:contentDescription="@string/action_unfix_from_location" | ||||
|             android:src="?attr/icon_directions" | ||||
|             app:backgroundTint="?colorPrimary" | ||||
|             app:tint="@color/white"/> | ||||
|             app:tint="@color/white" | ||||
|             android:layout_alignParentRight="true" /> | ||||
|     </RelativeLayout> | ||||
| </layout> | ||||
| @ -21,7 +21,8 @@ | ||||
|             android:listSelector="@android:color/transparent" | ||||
|             android:stackFromBottom="true" | ||||
|             android:transcriptMode="normal" | ||||
|             tools:listitem="@layout/message_sent"> | ||||
|             tools:listitem="@layout/message_sent" | ||||
|             android:layout_alignParentLeft="true"> | ||||
|         </ListView> | ||||
| 
 | ||||
|         <android.support.design.widget.FloatingActionButton | ||||
| @ -35,7 +36,8 @@ | ||||
|             android:src="?attr/icon_scroll_down" | ||||
|             app:fabSize="mini" | ||||
|             android:visibility="gone" | ||||
|             app:useCompatPadding="true"/> | ||||
|             app:useCompatPadding="true" | ||||
|             android:layout_alignParentRight="true" /> | ||||
| 
 | ||||
|         <eu.siacs.conversations.ui.widget.UnreadCountCustomView | ||||
|             android:id="@+id/unread_count_custom_view" | ||||
| @ -47,7 +49,10 @@ | ||||
|             android:layout_marginEnd="8dp" | ||||
|             android:elevation="8dp" | ||||
|             android:visibility="gone" | ||||
|             app:backgroundColor="?attr/unread_count" /> | ||||
|             app:backgroundColor="?attr/unread_count" | ||||
|             android:layout_alignRight="@+id/scroll_to_bottom_button" | ||||
|             tools:ignore="RtlCompat" | ||||
|             android:layout_marginRight="8dp" /> | ||||
| 
 | ||||
|         <RelativeLayout | ||||
|             android:id="@+id/textsend" | ||||
| @ -55,7 +60,8 @@ | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_alignParentBottom="true" | ||||
|             android:layout_alignParentStart="true" | ||||
|             android:background="?attr/color_background_primary"> | ||||
|             android:background="?attr/color_background_primary" | ||||
|             android:layout_alignParentLeft="true"> | ||||
| 
 | ||||
|             <android.support.v7.widget.RecyclerView | ||||
|                 android:visibility="gone" | ||||
| @ -68,7 +74,9 @@ | ||||
|                 android:orientation="horizontal" | ||||
|                 app:layoutManager="android.support.v7.widget.LinearLayoutManager" | ||||
|                 android:paddingTop="8dp" | ||||
|                 android:requiresFadingEdge="horizontal"> | ||||
|                 android:requiresFadingEdge="horizontal" | ||||
|                 android:layout_alignParentLeft="true" | ||||
|                 android:layout_toLeftOf="@+id/textSendButton"> | ||||
| 
 | ||||
|             </android.support.v7.widget.RecyclerView> | ||||
| 
 | ||||
| @ -89,7 +97,9 @@ | ||||
|                 android:paddingBottom="12dp" | ||||
|                 android:paddingLeft="8dp" | ||||
|                 android:paddingRight="8dp" | ||||
|                 android:paddingTop="12dp"> | ||||
|                 android:paddingTop="12dp" | ||||
|                 android:layout_alignParentLeft="true" | ||||
|                 android:layout_toLeftOf="@+id/textSendButton"> | ||||
| 
 | ||||
|                 <requestFocus/> | ||||
|             </eu.siacs.conversations.ui.widget.EditMessage> | ||||
| @ -102,7 +112,8 @@ | ||||
|                 android:layout_centerVertical="true" | ||||
|                 android:background="?attr/color_background_primary" | ||||
|                 android:contentDescription="@string/send_message" | ||||
|                 android:src="?attr/ic_send_text_offline"/> | ||||
|                 android:src="?attr/ic_send_text_offline" | ||||
|                 android:layout_alignParentRight="true" /> | ||||
|         </RelativeLayout> | ||||
| 
 | ||||
|         <RelativeLayout | ||||
| @ -125,7 +136,10 @@ | ||||
|                 android:layout_centerVertical="true" | ||||
|                 android:layout_toStartOf="@+id/snackbar_action" | ||||
|                 android:paddingStart="24dp" | ||||
|                 android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"/> | ||||
|                 android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" | ||||
|                 android:layout_alignParentLeft="true" | ||||
|                 android:paddingLeft="24dp" | ||||
|                 android:layout_toLeftOf="@+id/snackbar_action" /> | ||||
| 
 | ||||
|             <TextView | ||||
|                 android:id="@+id/snackbar_action" | ||||
| @ -139,7 +153,8 @@ | ||||
|                 android:paddingTop="16dp" | ||||
|                 android:textAllCaps="true" | ||||
|                 android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" | ||||
|                 android:textStyle="bold"/> | ||||
|                 android:textStyle="bold" | ||||
|                 android:layout_alignParentRight="true" /> | ||||
|         </RelativeLayout> | ||||
| 
 | ||||
|     </RelativeLayout> | ||||
|  | ||||
| @ -19,6 +19,7 @@ | ||||
|             android:layout_alignParentTop="true" | ||||
|             android:alpha="?attr/delete_icon_alpha" | ||||
|             android:background="?attr/selectableItemBackgroundBorderless" | ||||
|             android:src="?attr/icon_cancel"/> | ||||
|             android:src="?attr/icon_cancel" | ||||
|             android:layout_alignParentRight="true" /> | ||||
|     </RelativeLayout> | ||||
| </layout> | ||||
|  | ||||
| @ -17,7 +17,8 @@ | ||||
|         android:layout_alignParentEnd="true" | ||||
|         android:layout_alignParentBottom="true" | ||||
|         android:layout_width="wrap_content" | ||||
|         android:layout_height="wrap_content"> | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_alignParentRight="true"> | ||||
|         <com.makeramen.roundedimageview.RoundedImageView | ||||
|             android:id="@+id/message_photo" | ||||
|             android:layout_width="48dp" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alex Palaistras
						Alex Palaistras