Use app:srcCompat and derivatives intead of android: ones

To fix crashes on API 19
This commit is contained in:
Stypox 2020-03-31 09:34:05 +02:00
parent ea43b28f74
commit 3dcd2468a2
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
20 changed files with 53 additions and 50 deletions

View File

@ -182,7 +182,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:minWidth="0dp" android:minWidth="0dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="?attr/ic_delete" app:srcCompat="?attr/ic_delete"
android:visibility="gone" android:visibility="gone"
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:visibility="visible" /> tools:visibility="visible" />

View File

@ -1,8 +1,8 @@
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout <RelativeLayout
android:id="@+id/newPlaylist" android:id="@+id/newPlaylist"
@ -19,7 +19,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginRight="12dp" android:layout_marginRight="12dp"
android:src="?attr/ic_playlist_add" app:srcCompat="?attr/ic_playlist_add"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
<TextView <TextView

View File

@ -56,7 +56,7 @@
android:paddingTop="12dp" android:paddingTop="12dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:paddingBottom="12dp" android:paddingBottom="12dp"
android:src="?attr/ic_drag_handle" app:srcCompat="?attr/ic_drag_handle"
tools:ignore="ContentDescription,RtlHardcoded" /> tools:ignore="ContentDescription,RtlHardcoded" />
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

View File

@ -77,7 +77,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="12dp" android:paddingTop="12dp"
android:src="?attr/ic_drag_handle" app:srcCompat="?attr/ic_drag_handle"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
@ -63,7 +63,7 @@
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="?attr/ic_search_add" app:srcCompat="?attr/ic_search_add"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
</LinearLayout> </LinearLayout>

View File

@ -57,7 +57,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:paddingTop="12dp" android:paddingTop="12dp"
android:src="?attr/ic_drag_handle" app:srcCompat="?attr/ic_drag_handle"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
</RelativeLayout> </RelativeLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -56,7 +57,7 @@
android:layout_below="@id/itemCommentContentView" android:layout_below="@id/itemCommentContentView"
android:layout_toRightOf="@+id/itemThumbnailView" android:layout_toRightOf="@+id/itemThumbnailView"
android:contentDescription="@string/detail_likes_img_view_description" android:contentDescription="@string/detail_likes_img_view_description"
android:src="?attr/ic_thumb_up" /> app:srcCompat="?attr/ic_thumb_up" />
<TextView <TextView
android:id="@+id/detail_thumbs_up_count_view" android:id="@+id/detail_thumbs_up_count_view"
@ -82,7 +83,7 @@
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_toRightOf="@id/detail_thumbs_up_count_view" android:layout_toRightOf="@id/detail_thumbs_up_count_view"
android:contentDescription="@string/detail_dislikes_img_view_description" android:contentDescription="@string/detail_dislikes_img_view_description"
android:src="?attr/thumbs_down" app:srcCompat="?attr/thumbs_down"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<TextView <TextView

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -38,7 +38,7 @@
android:layout_below="@id/itemCommentContentView" android:layout_below="@id/itemCommentContentView"
android:layout_toRightOf="@+id/itemThumbnailView" android:layout_toRightOf="@+id/itemThumbnailView"
android:contentDescription="@string/detail_likes_img_view_description" android:contentDescription="@string/detail_likes_img_view_description"
android:src="?attr/ic_thumb_up" /> app:srcCompat="?attr/ic_thumb_up" />
<TextView <TextView
android:id="@+id/detail_thumbs_up_count_view" android:id="@+id/detail_thumbs_up_count_view"
@ -63,7 +63,7 @@
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_toRightOf="@id/detail_thumbs_up_count_view" android:layout_toRightOf="@id/detail_thumbs_up_count_view"
android:contentDescription="@string/detail_dislikes_img_view_description" android:contentDescription="@string/detail_dislikes_img_view_description"
android:src="?attr/thumbs_down" app:srcCompat="?attr/thumbs_down"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
<TextView <TextView

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -30,7 +30,7 @@
android:layout_alignRight="@id/itemThumbnailView" android:layout_alignRight="@id/itemThumbnailView"
android:layout_alignTop="@id/itemThumbnailView" android:layout_alignTop="@id/itemThumbnailView"
android:background="@color/playlist_stream_count_background_color" android:background="@color/playlist_stream_count_background_color"
android:drawableTop="@drawable/ic_playlist_play_white_24dp" app:drawableTopCompat="@drawable/ic_playlist_play_white_24dp"
android:gravity="center" android:gravity="center"
android:paddingBottom="14dp" android:paddingBottom="14dp"
android:paddingTop="16dp" android:paddingTop="16dp"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/video_item_search_height" android:layout_height="@dimen/video_item_search_height"
@ -31,7 +31,7 @@
android:layout_alignRight="@id/itemThumbnailView" android:layout_alignRight="@id/itemThumbnailView"
android:layout_alignTop="@id/itemThumbnailView" android:layout_alignTop="@id/itemThumbnailView"
android:background="@color/playlist_stream_count_background_color" android:background="@color/playlist_stream_count_background_color"
android:drawableTop="@drawable/ic_playlist_play_white_24dp" app:drawableTopCompat="@drawable/ic_playlist_play_white_24dp"
android:gravity="center" android:gravity="center"
android:paddingBottom="14dp" android:paddingBottom="14dp"
android:paddingTop="16dp" android:paddingTop="16dp"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -31,7 +31,7 @@
android:layout_alignRight="@id/itemThumbnailView" android:layout_alignRight="@id/itemThumbnailView"
android:layout_alignTop="@id/itemThumbnailView" android:layout_alignTop="@id/itemThumbnailView"
android:background="@color/playlist_stream_count_background_color" android:background="@color/playlist_stream_count_background_color"
android:drawableTop="@drawable/ic_playlist_play_white_24dp" app:drawableTopCompat="@drawable/ic_playlist_play_white_24dp"
android:gravity="center" android:gravity="center"
android:paddingBottom="6dp" android:paddingBottom="6dp"
android:paddingTop="4dp" android:paddingTop="4dp"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -49,7 +50,7 @@
android:contentDescription="@string/detail_drag_description" android:contentDescription="@string/detail_drag_description"
android:paddingLeft="@dimen/video_item_search_image_right_margin" android:paddingLeft="@dimen/video_item_search_image_right_margin"
android:scaleType="center" android:scaleType="center"
android:src="?attr/ic_drag_handle" app:srcCompat="?attr/ic_drag_handle"
tools:ignore="RtlHardcoded,RtlSymmetry" /> tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView <TextView

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/itemRoot" android:id="@+id/itemRoot"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -50,7 +50,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:paddingLeft="@dimen/video_item_search_image_right_margin" android:paddingLeft="@dimen/video_item_search_image_right_margin"
android:scaleType="center" android:scaleType="center"
android:src="?attr/ic_drag_handle" app:srcCompat="?attr/ic_drag_handle"
android:contentDescription="@string/detail_drag_description" android:contentDescription="@string/detail_drag_description"
tools:ignore="RtlHardcoded,RtlSymmetry"/> tools:ignore="RtlHardcoded,RtlSymmetry"/>

View File

@ -1,5 +1,6 @@
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent"> android:layout_width="match_parent">
@ -69,7 +70,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:src="@drawable/ic_more_vert_white_24dp" app:srcCompat="@drawable/ic_more_vert_white_24dp"
android:scaleType="centerInside" android:scaleType="centerInside"
android:contentDescription="TODO" /> android:contentDescription="TODO" />

View File

@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal" android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="24dp" android:layout_marginBottom="24dp"
android:src="@drawable/ic_close_white_24dp" app:srcCompat="@drawable/ic_close_white_24dp"
app:backgroundTint="@color/light_youtube_primary_color" app:backgroundTint="@color/light_youtube_primary_color"
app:borderWidth="0dp" app:borderWidth="0dp"
app:fabSize="normal"/> app:fabSize="normal"/>

View File

@ -82,6 +82,6 @@
android:focusable="true" android:focusable="true"
android:padding="5dp" android:padding="5dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@drawable/ic_close_white_24dp" app:srcCompat="@drawable/ic_close_white_24dp"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
</LinearLayout> </LinearLayout>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/playlist_control" android:id="@+id/playlist_control"
xmlns:android="http://schemas.android.com/apk/res/android"
android:visibility="invisible" android:visibility="invisible"
tools:visibility="visible"> tools:visibility="visible">
@ -26,8 +26,8 @@
android:textSize="@dimen/channel_rss_title_size" android:textSize="@dimen/channel_rss_title_size"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:drawableLeft="?attr/ic_headset" app:drawableLeftCompat="?attr/ic_headset"
android:drawableStart="?attr/ic_headset"/> app:drawableStartCompat="?attr/ic_headset"/>
</LinearLayout> </LinearLayout>
<View android:id="@+id/anchorLeft" <View android:id="@+id/anchorLeft"
@ -81,7 +81,7 @@
android:textSize="@dimen/channel_rss_title_size" android:textSize="@dimen/channel_rss_title_size"
android:textColor="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:drawablePadding="4dp" android:drawablePadding="4dp"
android:drawableLeft="?attr/ic_popup" app:drawableLeftCompat="?attr/ic_popup"
android:drawableStart="?attr/ic_popup"/> app:drawableStartCompat="?attr/ic_popup"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
@ -22,7 +22,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginRight="12dp" android:layout_marginRight="12dp"
android:src="?attr/ic_filter_list" app:srcCompat="?attr/ic_filter_list"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
<TextView <TextView

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp"> android:layout_height="48dp"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView <ImageView
android:id="@+id/wo_sound_icon" android:id="@+id/wo_sound_icon"
@ -13,7 +13,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="6dp" android:layout_marginLeft="6dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="?attr/ic_volume_off" app:srcCompat="?attr/ic_volume_off"
tools:ignore="ContentDescription,RtlHardcoded"/> tools:ignore="ContentDescription,RtlHardcoded"/>
<TextView <TextView

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/colorPrimary"> android:background="?attr/colorPrimary">
<EditText <EditText
@ -44,7 +44,7 @@
android:layout_gravity="center" android:layout_gravity="center"
android:contentDescription="@string/search" android:contentDescription="@string/search"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="?attr/ic_close" app:srcCompat="?attr/ic_close"
tools:ignore="RtlHardcoded"/> tools:ignore="RtlHardcoded"/>
</FrameLayout> </FrameLayout>