From b1257809915d2c4b0025f3b491eecd5154a4bf4f Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:46:39 -0400 Subject: [PATCH] Clean up pre-Lollipop compat attributes --- app/build.gradle | 1 - .../activity_player_queue_control.xml | 10 ++-- .../fragment_video_detail.xml | 58 ++++++++---------- .../layout/activity_player_queue_control.xml | 10 ++-- .../res/layout/dialog_feed_group_create.xml | 2 +- .../res/layout/dialog_playback_parameter.xml | 3 +- app/src/main/res/layout/dialog_playlists.xml | 3 +- app/src/main/res/layout/drawer_header.xml | 6 +- .../res/layout/feed_group_add_new_item.xml | 2 +- .../res/layout/feed_group_reorder_item.xml | 2 +- app/src/main/res/layout/fragment_about.xml | 3 +- .../main/res/layout/fragment_choose_tabs.xml | 4 +- .../main/res/layout/fragment_description.xml | 4 +- app/src/main/res/layout/fragment_feed.xml | 3 +- .../res/layout/fragment_instance_list.xml | 4 +- .../main/res/layout/fragment_video_detail.xml | 59 ++++++++----------- app/src/main/res/layout/item_instance.xml | 2 +- .../res/layout/item_search_suggestion.xml | 3 +- app/src/main/res/layout/list_choose_tabs.xml | 2 +- .../main/res/layout/list_comments_item.xml | 36 ++--------- .../res/layout/list_comments_mini_item.xml | 29 +-------- .../res/layout/list_playlist_grid_item.xml | 5 +- .../main/res/layout/list_playlist_item.xml | 5 +- .../res/layout/list_playlist_mini_item.xml | 5 +- .../layout/list_stream_playlist_grid_item.xml | 3 +- .../res/layout/list_stream_playlist_item.xml | 3 +- app/src/main/res/layout/mission_item.xml | 2 +- .../main/res/layout/mission_item_linear.xml | 2 +- .../res/layout/picker_subscription_item.xml | 2 +- app/src/main/res/layout/play_queue_item.xml | 2 +- app/src/main/res/layout/player.xml | 36 +++++------ .../layout/player_fast_seek_seconds_view.xml | 7 +-- .../res/layout/player_popup_close_overlay.xml | 4 +- app/src/main/res/layout/playlist_control.xml | 11 ++-- .../res/layout/statistic_playlist_control.xml | 3 +- .../main/res/layout/stream_quality_item.xml | 3 +- .../main/res/layout/toolbar_search_layout.xml | 2 +- 37 files changed, 122 insertions(+), 219 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 06eb822cc..67026df7e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,7 +20,6 @@ android { versionName "0.23.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables.useSupportLibrary = true javaCompileOptions { annotationProcessorOptions { diff --git a/app/src/main/res/layout-land/activity_player_queue_control.xml b/app/src/main/res/layout-land/activity_player_queue_control.xml index c2359552e..7d3b43ecc 100644 --- a/app/src/main/res/layout-land/activity_player_queue_control.xml +++ b/app/src/main/res/layout-land/activity_player_queue_control.xml @@ -138,8 +138,8 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" + android:src="@drawable/ic_pause" android:tint="?attr/colorAccent" - app:srcCompat="@drawable/ic_pause" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 851085b5b..d8e52b354 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -65,8 +65,8 @@ android:layout_height="64dp" android:layout_gravity="center" android:background="@android:color/transparent" + android:src="@drawable/ic_play_arrow_shadow" android:visibility="invisible" - app:srcCompat="@drawable/ic_play_arrow_shadow" tools:ignore="ContentDescription" tools:visibility="visible" /> @@ -199,7 +199,7 @@ android:layout_gravity="top|end" android:layout_marginTop="11dp" android:layout_marginEnd="10dp" - app:srcCompat="@drawable/ic_expand_more" + android:src="@drawable/ic_expand_more" tools:ignore="ContentDescription" /> @@ -326,18 +326,6 @@ tools:text="Uploader" /> - @@ -369,7 +357,7 @@ android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" android:contentDescription="@string/detail_likes_img_view_description" - app:srcCompat="@drawable/ic_thumb_up" /> + android:src="@drawable/ic_thumb_up" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> @@ -526,12 +514,12 @@ android:background="?attr/selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/share" + android:drawableTop="@drawable/ic_share" android:focusable="true" android:gravity="center" android:paddingVertical="@dimen/detail_control_padding" android:text="@string/share" - android:textSize="@dimen/detail_control_text_size" - app:drawableTopCompat="@drawable/ic_share" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> - + android:textSize="@dimen/detail_control_text_size" /> @@ -719,7 +707,7 @@ android:scaleType="center" android:focusable="true" android:focusedByDefault="true" - app:srcCompat="@drawable/ic_play_arrow" + android:src="@drawable/ic_play_arrow" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/activity_player_queue_control.xml b/app/src/main/res/layout/activity_player_queue_control.xml index 24e062932..29efa36f9 100644 --- a/app/src/main/res/layout/activity_player_queue_control.xml +++ b/app/src/main/res/layout/activity_player_queue_control.xml @@ -174,8 +174,8 @@ android:clickable="true" android:focusable="true" android:scaleType="fitXY" + android:src="@drawable/ic_repeat" android:tint="?attr/colorAccent" - app:srcCompat="@drawable/ic_repeat" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout/dialog_feed_group_create.xml b/app/src/main/res/layout/dialog_feed_group_create.xml index a08041e97..464940238 100644 --- a/app/src/main/res/layout/dialog_feed_group_create.xml +++ b/app/src/main/res/layout/dialog_feed_group_create.xml @@ -193,8 +193,8 @@ android:layout_centerVertical="true" android:minWidth="0dp" android:scaleType="centerInside" + android:src="@drawable/ic_delete" android:visibility="gone" - app:srcCompat="@drawable/ic_delete" tools:ignore="ContentDescription" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/dialog_playback_parameter.xml b/app/src/main/res/layout/dialog_playback_parameter.xml index e402f4fb1..cc506cc79 100644 --- a/app/src/main/res/layout/dialog_playback_parameter.xml +++ b/app/src/main/res/layout/dialog_playback_parameter.xml @@ -1,6 +1,5 @@ @@ -20,7 +19,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="12dp" android:layout_marginRight="12dp" - app:srcCompat="@drawable/ic_playlist_add" + android:src="@drawable/ic_playlist_add" tools:ignore="ContentDescription,RtlHardcoded" /> + tools:src="@drawable/ic_smart_display" /> diff --git a/app/src/main/res/layout/feed_group_add_new_item.xml b/app/src/main/res/layout/feed_group_add_new_item.xml index df3fc9b3a..0dfe819a6 100644 --- a/app/src/main/res/layout/feed_group_add_new_item.xml +++ b/app/src/main/res/layout/feed_group_add_new_item.xml @@ -24,7 +24,7 @@ android:layout_height="14dp" android:layout_gravity="center" android:scaleType="centerInside" - app:srcCompat="@drawable/ic_add" + android:src="@drawable/ic_add" tools:ignore="ContentDescription" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index db93f1d8d..1807acb10 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,5 +1,4 @@ + android:src="@mipmap/ic_launcher" /> + app:layout_constraintEnd_toEndOf="parent" /> diff --git a/app/src/main/res/layout/fragment_description.xml b/app/src/main/res/layout/fragment_description.xml index b020d5db3..157b8f394 100644 --- a/app/src/main/res/layout/fragment_description.xml +++ b/app/src/main/res/layout/fragment_description.xml @@ -38,11 +38,11 @@ android:contentDescription="@string/description_select_enable" android:focusable="true" android:padding="5dp" + android:src="@drawable/ic_select_all" app:layout_constraintBottom_toTopOf="@+id/barrier" app:layout_constraintDimensionRatio="1" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_select_all" /> + app:layout_constraintTop_toTopOf="parent" /> @@ -57,7 +56,7 @@ android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:layout_marginEnd="12dp" - app:srcCompat="@drawable/ic_refresh" + android:src="@drawable/ic_refresh" tools:ignore="ContentDescription" /> + app:fabSize="auto" /> diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 08a9bcf0a..18655283e 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -55,8 +55,8 @@ android:layout_height="64dp" android:layout_gravity="center" android:background="@android:color/transparent" + android:src="@drawable/ic_play_arrow_shadow" android:visibility="invisible" - app:srcCompat="@drawable/ic_play_arrow_shadow" tools:ignore="ContentDescription" tools:visibility="visible" /> @@ -187,7 +187,7 @@ android:layout_gravity="top|end" android:layout_marginTop="11dp" android:layout_marginEnd="10dp" - app:srcCompat="@drawable/ic_expand_more" + android:src="@drawable/ic_expand_more" tools:ignore="ContentDescription" /> @@ -313,19 +313,6 @@ tools:text="Uploader" /> - - @@ -357,7 +344,7 @@ android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" android:contentDescription="@string/detail_likes_img_view_description" - app:srcCompat="@drawable/ic_thumb_up" /> + android:src="@drawable/ic_thumb_up" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> @@ -510,12 +497,12 @@ android:background="?attr/selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/share" + android:drawableTop="@drawable/ic_share" android:focusable="true" android:gravity="center" android:paddingVertical="@dimen/detail_control_padding" android:text="@string/share" - android:textSize="@dimen/detail_control_text_size" - app:drawableTopCompat="@drawable/ic_share" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> + android:textSize="@dimen/detail_control_text_size" /> - + android:textSize="@dimen/detail_control_text_size" /> @@ -696,7 +683,7 @@ android:scaleType="center" android:focusable="true" android:focusedByDefault="true" - app:srcCompat="@drawable/ic_play_arrow" + android:src="@drawable/ic_play_arrow" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/item_instance.xml b/app/src/main/res/layout/item_instance.xml index dd5b4156f..12ecb2ea7 100644 --- a/app/src/main/res/layout/item_instance.xml +++ b/app/src/main/res/layout/item_instance.xml @@ -75,7 +75,7 @@ android:paddingTop="12dp" android:paddingRight="10dp" android:paddingBottom="12dp" - app:srcCompat="@drawable/ic_drag_handle" + android:src="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/item_search_suggestion.xml b/app/src/main/res/layout/item_search_suggestion.xml index 4b1025fea..f7a07bbcc 100644 --- a/app/src/main/res/layout/item_search_suggestion.xml +++ b/app/src/main/res/layout/item_search_suggestion.xml @@ -1,6 +1,5 @@ diff --git a/app/src/main/res/layout/list_choose_tabs.xml b/app/src/main/res/layout/list_choose_tabs.xml index e6cebda11..ed7ad94c4 100644 --- a/app/src/main/res/layout/list_choose_tabs.xml +++ b/app/src/main/res/layout/list_choose_tabs.xml @@ -55,7 +55,7 @@ android:paddingTop="12dp" android:paddingRight="16dp" android:paddingBottom="12dp" - app:srcCompat="@drawable/ic_drag_handle" + android:src="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_item.xml b/app/src/main/res/layout/list_comments_item.xml index 3b148de03..4358c438f 100644 --- a/app/src/main/res/layout/list_comments_item.xml +++ b/app/src/main/res/layout/list_comments_item.xml @@ -32,8 +32,8 @@ android:layout_marginRight="@dimen/video_item_detail_pinned_right_margin" android:layout_toEndOf="@+id/itemThumbnailView" android:contentDescription="@string/detail_pinned_comment_view_description" + android:src="@drawable/ic_pin" android:visibility="gone" - app:srcCompat="@drawable/ic_pin" tools:visibility="visible" /> + android:src="@drawable/ic_thumb_up" /> - - - - - + tools:visibility="visible" /> + android:src="@drawable/ic_thumb_up" /> - - - - diff --git a/app/src/main/res/layout/mission_item_linear.xml b/app/src/main/res/layout/mission_item_linear.xml index d7235fcaf..ce2d1af4b 100644 --- a/app/src/main/res/layout/mission_item_linear.xml +++ b/app/src/main/res/layout/mission_item_linear.xml @@ -72,7 +72,7 @@ android:layout_marginRight="4dp" android:contentDescription="TODO" android:scaleType="centerInside" - app:srcCompat="@drawable/ic_more_vert" + android:src="@drawable/ic_more_vert" app:tint="?attr/actionColor" /> diff --git a/app/src/main/res/layout/picker_subscription_item.xml b/app/src/main/res/layout/picker_subscription_item.xml index 1aaa1e7d8..c858ccc4e 100644 --- a/app/src/main/res/layout/picker_subscription_item.xml +++ b/app/src/main/res/layout/picker_subscription_item.xml @@ -52,8 +52,8 @@ android:layout_gravity="top|center_horizontal" android:layout_marginTop="4dp" android:scaleType="centerInside" + android:src="@drawable/ic_done" app:tint="@color/white" - app:srcCompat="@drawable/ic_done" tools:ignore="ContentDescription" /> diff --git a/app/src/main/res/layout/play_queue_item.xml b/app/src/main/res/layout/play_queue_item.xml index 5fb9419f6..7d672dc8b 100644 --- a/app/src/main/res/layout/play_queue_item.xml +++ b/app/src/main/res/layout/play_queue_item.xml @@ -89,10 +89,10 @@ android:layout_gravity="center_vertical" android:paddingHorizontal="@dimen/video_item_search_image_right_margin" android:scaleType="center" + android:src="@drawable/ic_drag_handle" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/player.xml b/app/src/main/res/layout/player.xml index d748942e0..b8b60b3f8 100644 --- a/app/src/main/res/layout/player.xml +++ b/app/src/main/res/layout/player.xml @@ -112,8 +112,8 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" + android:src="@drawable/ic_close" android:visibility="gone" - app:srcCompat="@drawable/ic_close" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -198,8 +198,8 @@ android:paddingEnd="3dp" android:paddingBottom="3dp" android:scaleType="fitCenter" + android:src="@drawable/ic_list" android:visibility="gone" - app:srcCompat="@drawable/ic_list" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -216,8 +216,8 @@ android:paddingEnd="6dp" android:paddingBottom="3dp" android:scaleType="fitCenter" + android:src="@drawable/ic_format_list_numbered" android:visibility="gone" - app:srcCompat="@drawable/ic_format_list_numbered" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -230,7 +230,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_expand_more" + android:src="@drawable/ic_expand_more" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -294,7 +294,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_cast" + android:src="@drawable/ic_cast" app:tint="@color/white" tools:ignore="RtlHardcoded" /> @@ -309,7 +309,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_language" + android:src="@drawable/ic_language" app:tint="@color/white" tools:ignore="RtlHardcoded" /> @@ -324,7 +324,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_share" + android:src="@drawable/ic_share" app:tint="@color/white" tools:ignore="RtlHardcoded" /> @@ -338,7 +338,7 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_volume_off" + android:src="@drawable/ic_volume_off" app:tint="@color/white" tools:ignore="RtlHardcoded" /> @@ -351,8 +351,8 @@ android:focusable="true" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" + android:src="@drawable/ic_fullscreen" android:visibility="gone" - app:srcCompat="@drawable/ic_fullscreen" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -397,8 +397,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="2dp" + android:src="@drawable/dummy_thumbnail" android:visibility="gone" - app:srcCompat="@drawable/dummy_thumbnail" tools:visibility="visible" /> @@ -475,8 +475,8 @@ android:nextFocusUp="@id/playbackSeekBar" android:padding="@dimen/player_main_buttons_padding" android:scaleType="fitCenter" + android:src="@drawable/ic_fullscreen" android:visibility="gone" - app:srcCompat="@drawable/ic_fullscreen" app:tint="@color/white" tools:ignore="ContentDescription,RtlHardcoded" tools:visibility="visible" /> @@ -500,7 +500,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_previous" + android:src="@drawable/ic_previous" app:tint="@color/white" tools:ignore="ContentDescription" /> @@ -512,7 +512,7 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_pause" + android:src="@drawable/ic_pause" app:tint="@color/white" tools:ignore="ContentDescription" /> @@ -526,7 +526,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_next" + android:src="@drawable/ic_next" app:tint="@color/white" tools:ignore="ContentDescription" /> @@ -577,8 +577,8 @@ android:focusable="true" android:padding="10dp" android:scaleType="fitXY" + android:src="@drawable/exo_controls_repeat_off" android:tint="?attr/colorAccent" - app:srcCompat="@drawable/exo_controls_repeat_off" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/player_fast_seek_seconds_view.xml b/app/src/main/res/layout/player_fast_seek_seconds_view.xml index 57f5aa787..2946f8449 100644 --- a/app/src/main/res/layout/player_fast_seek_seconds_view.xml +++ b/app/src/main/res/layout/player_fast_seek_seconds_view.xml @@ -1,6 +1,5 @@ diff --git a/app/src/main/res/layout/player_popup_close_overlay.xml b/app/src/main/res/layout/player_popup_close_overlay.xml index b2403583d..10d81d77e 100644 --- a/app/src/main/res/layout/player_popup_close_overlay.xml +++ b/app/src/main/res/layout/player_popup_close_overlay.xml @@ -10,8 +10,8 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="24dp" + android:src="@drawable/ic_close" app:backgroundTint="@color/light_youtube_primary_color" app:borderWidth="0dp" - app:fabSize="normal" - app:srcCompat="@drawable/ic_close" /> + app:fabSize="normal" /> diff --git a/app/src/main/res/layout/playlist_control.xml b/app/src/main/res/layout/playlist_control.xml index a5f258f50..5a8856128 100644 --- a/app/src/main/res/layout/playlist_control.xml +++ b/app/src/main/res/layout/playlist_control.xml @@ -1,6 +1,5 @@ + android:textSize="@dimen/channel_rss_title_size" /> + android:textSize="@dimen/channel_rss_title_size" /> diff --git a/app/src/main/res/layout/statistic_playlist_control.xml b/app/src/main/res/layout/statistic_playlist_control.xml index 577e94e4b..36540d32e 100644 --- a/app/src/main/res/layout/statistic_playlist_control.xml +++ b/app/src/main/res/layout/statistic_playlist_control.xml @@ -1,6 +1,5 @@ @@ -13,7 +12,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="6dp" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_volume_off" + android:src="@drawable/ic_volume_off" tools:ignore="ContentDescription,RtlHardcoded" />