From b3ef42e29046436253089070dd6e1ca969d5bf6a Mon Sep 17 00:00:00 2001 From: Fahim Date: Fri, 3 Sep 2021 02:03:32 +0600 Subject: [PATCH] 2831-Q-dark_mode_implementation issue: https://gitlab.e.foundation/e/backlog/-/issues/2831 --- res/drawable/bottom_shadow.xml | 2 +- res/drawable/btn_add_to_playlist.xml | 2 +- res/drawable/btn_playback_browse.xml | 2 +- res/drawable/btn_playback_icon.xml | 2 +- res/drawable/btn_queue_icon.xml | 2 +- res/drawable/drag_indicator.xml | 2 +- res/drawable/gray_circle.xml | 2 +- res/drawable/gripper.xml | 2 +- res/drawable/gripper_light.xml | 2 +- res/drawable/history_icon.xml | 2 +- res/drawable/ic_action_search.xml | 2 +- res/drawable/ic_default_artwork.xml | 16 ++ res/drawable/menu_button.xml | 2 +- res/drawable/menu_button_light.xml | 2 +- res/drawable/no_results.xml | 2 +- res/drawable/playlist_icon.xml | 2 +- res/drawable/recent_icon.xml | 2 +- res/drawable/recently_added.xml | 2 +- res/drawable/right_shadow.xml | 2 +- res/drawable/round_corner_rect.xml | 2 +- res/drawable/selectable_background.xml | 2 +- res/drawable/selectable_background_light.xml | 2 +- res/drawable/top_tracks_icon.xml | 2 +- res/drawable/view_pager_tab_background.xml | 2 +- res/layout-land/activity_player_fragment.xml | 1 + res/layout/activity_album_detail.xml | 3 +- res/layout/activity_audio_preview.xml | 8 +- res/layout/activity_base.xml | 3 +- res/layout/activity_player_fragment.xml | 2 +- res/layout/album_art_fragment.xml | 2 +- res/layout/album_detail_song.xml | 1 + res/layout/artist_detail_album.xml | 1 + res/layout/artist_detail_song.xml | 1 + res/layout/bottom_action_bar.xml | 4 +- res/layout/custom_select_dialog_item.xml | 14 ++ res/layout/edit_queue_list_item.xml | 1 - res/layout/grid_items_normal.xml | 1 + res/layout/header_bar.xml | 1 + res/layout/list_base.xml | 1 + res/layout/list_item_common.xml | 1 + res/layout/list_item_queue.xml | 1 + res/layout/list_item_simple.xml | 1 + res/layout/list_item_top_tracks.xml | 1 + res/layout/loading_empty_container.xml | 1 + res/layout/main_album_flow.xml | 8 +- .../play_pause_progress_button_collapsed.xml | 4 +- res/layout/playlist_detail_header.xml | 1 + res/values-night-v27/styles.xml | 7 + res/values-night/styles.xml | 5 + res/values-v27/styles.xml | 7 + res/values/colors.xml | 154 +++++++++--------- res/values/styles.xml | 42 ++++- .../lineageos/eleven/cache/ImageWorker.java | 30 +++- .../eleven/menu/BasePlaylistDialog.java | 3 + .../eleven/menu/PhotoSelectionDialog.java | 26 ++- .../eleven/ui/activities/BaseActivity.java | 2 +- .../ui/fragments/PlaylistDetailFragment.java | 24 ++- .../lineageos/eleven/utils/MusicUtils.java | 2 +- .../eleven/widgets/AlbumScrimImage.java | 6 +- .../eleven/widgets/NoResultsContainer.java | 1 - 60 files changed, 281 insertions(+), 152 deletions(-) create mode 100644 res/drawable/ic_default_artwork.xml create mode 100644 res/layout/custom_select_dialog_item.xml create mode 100644 res/values-night-v27/styles.xml create mode 100644 res/values-night/styles.xml create mode 100644 res/values-v27/styles.xml diff --git a/res/drawable/bottom_shadow.xml b/res/drawable/bottom_shadow.xml index 7b6385c2..2122798b 100644 --- a/res/drawable/bottom_shadow.xml +++ b/res/drawable/bottom_shadow.xml @@ -21,6 +21,6 @@ + android:startColor="@color/primary_text" /> diff --git a/res/drawable/btn_add_to_playlist.xml b/res/drawable/btn_add_to_playlist.xml index 1907ca04..d3a59b82 100644 --- a/res/drawable/btn_add_to_playlist.xml +++ b/res/drawable/btn_add_to_playlist.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/btn_playback_browse.xml b/res/drawable/btn_playback_browse.xml index 2602092c..54e5e58d 100644 --- a/res/drawable/btn_playback_browse.xml +++ b/res/drawable/btn_playback_browse.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/btn_playback_icon.xml b/res/drawable/btn_playback_icon.xml index b3aaacbd..7945505c 100644 --- a/res/drawable/btn_playback_icon.xml +++ b/res/drawable/btn_playback_icon.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/btn_queue_icon.xml b/res/drawable/btn_queue_icon.xml index bce1cf2d..a72e4fe1 100644 --- a/res/drawable/btn_queue_icon.xml +++ b/res/drawable/btn_queue_icon.xml @@ -6,7 +6,7 @@ android:viewportHeight="24"> diff --git a/res/drawable/drag_indicator.xml b/res/drawable/drag_indicator.xml index 4298d28b..5ca25012 100644 --- a/res/drawable/drag_indicator.xml +++ b/res/drawable/drag_indicator.xml @@ -5,6 +5,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/res/drawable/gray_circle.xml b/res/drawable/gray_circle.xml index 8a53cf38..20e170be 100644 --- a/res/drawable/gray_circle.xml +++ b/res/drawable/gray_circle.xml @@ -15,5 +15,5 @@ limitations under the License. --> - + \ No newline at end of file diff --git a/res/drawable/gripper.xml b/res/drawable/gripper.xml index a2c58d63..e5385f84 100644 --- a/res/drawable/gripper.xml +++ b/res/drawable/gripper.xml @@ -5,6 +5,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/res/drawable/gripper_light.xml b/res/drawable/gripper_light.xml index 4298d28b..e5385f84 100644 --- a/res/drawable/gripper_light.xml +++ b/res/drawable/gripper_light.xml @@ -5,6 +5,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/res/drawable/history_icon.xml b/res/drawable/history_icon.xml index d4728701..39581a60 100644 --- a/res/drawable/history_icon.xml +++ b/res/drawable/history_icon.xml @@ -6,7 +6,7 @@ android:viewportHeight="24"> + + + + + + diff --git a/res/drawable/menu_button.xml b/res/drawable/menu_button.xml index 89a4dcaa..da1adfc9 100644 --- a/res/drawable/menu_button.xml +++ b/res/drawable/menu_button.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/menu_button_light.xml b/res/drawable/menu_button_light.xml index 5d8af81b..da1adfc9 100644 --- a/res/drawable/menu_button_light.xml +++ b/res/drawable/menu_button_light.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/no_results.xml b/res/drawable/no_results.xml index 6299d021..1e17a211 100644 --- a/res/drawable/no_results.xml +++ b/res/drawable/no_results.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/playlist_icon.xml b/res/drawable/playlist_icon.xml index 454540cd..58bd2d12 100644 --- a/res/drawable/playlist_icon.xml +++ b/res/drawable/playlist_icon.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/recent_icon.xml b/res/drawable/recent_icon.xml index 7605ba75..39581a60 100644 --- a/res/drawable/recent_icon.xml +++ b/res/drawable/recent_icon.xml @@ -6,7 +6,7 @@ android:viewportHeight="24"> diff --git a/res/drawable/right_shadow.xml b/res/drawable/right_shadow.xml index 85e57445..ef3fc62c 100644 --- a/res/drawable/right_shadow.xml +++ b/res/drawable/right_shadow.xml @@ -21,6 +21,6 @@ + android:startColor="@color/primary_text" /> \ No newline at end of file diff --git a/res/drawable/round_corner_rect.xml b/res/drawable/round_corner_rect.xml index 23dce5c1..1216f674 100644 --- a/res/drawable/round_corner_rect.xml +++ b/res/drawable/round_corner_rect.xml @@ -5,7 +5,7 @@ android:radius="10dp" /> \ No newline at end of file diff --git a/res/drawable/selectable_background.xml b/res/drawable/selectable_background.xml index cc32cb7b..763e8df8 100644 --- a/res/drawable/selectable_background.xml +++ b/res/drawable/selectable_background.xml @@ -15,4 +15,4 @@ --> + android:color="@color/background_color" /> diff --git a/res/drawable/selectable_background_light.xml b/res/drawable/selectable_background_light.xml index ed49ae52..3e1e6c6b 100644 --- a/res/drawable/selectable_background_light.xml +++ b/res/drawable/selectable_background_light.xml @@ -14,4 +14,4 @@ --> + android:color="@color/background_color" /> diff --git a/res/drawable/top_tracks_icon.xml b/res/drawable/top_tracks_icon.xml index 327d4ac2..44bb0173 100644 --- a/res/drawable/top_tracks_icon.xml +++ b/res/drawable/top_tracks_icon.xml @@ -8,7 +8,7 @@ diff --git a/res/drawable/view_pager_tab_background.xml b/res/drawable/view_pager_tab_background.xml index f9e09d4e..0b419171 100644 --- a/res/drawable/view_pager_tab_background.xml +++ b/res/drawable/view_pager_tab_background.xml @@ -17,6 +17,6 @@ - + diff --git a/res/layout-land/activity_player_fragment.xml b/res/layout-land/activity_player_fragment.xml index ffeef76d..85644ef9 100644 --- a/res/layout-land/activity_player_fragment.xml +++ b/res/layout-land/activity_player_fragment.xml @@ -22,6 +22,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/background_color" android:orientation="vertical"> @@ -56,6 +59,7 @@ android:maxHeight="@dimen/preview_layout_seekbar_height" android:minHeight="@dimen/preview_layout_seekbar_height" android:layout_height="@dimen/preview_layout_seekbar_height" + android:progressDrawable="@drawable/circular_drawable" android:layout_width="match_parent" /> @@ -83,6 +87,7 @@ android:layout_alignParentTop="true" android:gravity="top" android:layout_toLeftOf="@id/ib_playpause" + android:textColor="@color/primary_text" android:ellipsize="end" android:textSize="@dimen/preview_title_textSize" android:textStyle="bold"/> @@ -94,6 +99,7 @@ android:layout_alignParentLeft="true" android:layout_below="@id/tv_title" android:layout_toLeftOf="@id/ib_playpause" + android:textColor="@color/secondary_text" android:ellipsize="end" android:textSize="@dimen/preview_artist_textSize" android:textStyle="italic"/> diff --git a/res/layout/activity_base.xml b/res/layout/activity_base.xml index 6b2ac8e9..67324585 100644 --- a/res/layout/activity_base.xml +++ b/res/layout/activity_base.xml @@ -104,6 +104,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginBottom="5dp" + android:layout_marginTop="5dp" android:background="@drawable/round_corner_rect"> diff --git a/res/layout/activity_player_fragment.xml b/res/layout/activity_player_fragment.xml index dd9c63ca..e9352cea 100644 --- a/res/layout/activity_player_fragment.xml +++ b/res/layout/activity_player_fragment.xml @@ -25,7 +25,7 @@ xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" tools:background="@color/blue_dark" - android:background="@color/player_action_bar_color" + android:background="@color/background_color" > + android:src="@drawable/ic_default_artwork"/> diff --git a/res/layout/album_detail_song.xml b/res/layout/album_detail_song.xml index de709c1e..f877ad65 100644 --- a/res/layout/album_detail_song.xml +++ b/res/layout/album_detail_song.xml @@ -23,6 +23,7 @@ android:layout_width="@dimen/overflow_width" android:layout_height="@dimen/overflow_height" android:gravity="center" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> diff --git a/res/layout/artist_detail_album.xml b/res/layout/artist_detail_album.xml index 344fe048..c87be15b 100644 --- a/res/layout/artist_detail_album.xml +++ b/res/layout/artist_detail_album.xml @@ -46,6 +46,7 @@ android:layout_alignParentEnd="true" android:layout_marginBottom="1dp" android:gravity="center_vertical" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> diff --git a/res/layout/bottom_action_bar.xml b/res/layout/bottom_action_bar.xml index 3005fbb1..e868a1b1 100644 --- a/res/layout/bottom_action_bar.xml +++ b/res/layout/bottom_action_bar.xml @@ -24,7 +24,7 @@ android:clickable="true" android:orientation="horizontal" android:elevation="@dimen/action_bar_elevation" - android:background="@color/lineage_blue_color" + android:background="@color/accent" tools:ignore="ContentDescription" > + android:src="@drawable/ic_default_artwork" /> + + \ No newline at end of file diff --git a/res/layout/edit_queue_list_item.xml b/res/layout/edit_queue_list_item.xml index f592bc5a..99f082c1 100644 --- a/res/layout/edit_queue_list_item.xml +++ b/res/layout/edit_queue_list_item.xml @@ -26,7 +26,6 @@ android:layout_height="@dimen/drag_and_drop_height" android:layout_centerVertical="true" android:scaleType="fitXY" - android:tint="@color/lineage_blue_color" android:src="@drawable/gripper_light" /> diff --git a/res/layout/header_bar.xml b/res/layout/header_bar.xml index dd8cb18f..cc3516a7 100644 --- a/res/layout/header_bar.xml +++ b/res/layout/header_bar.xml @@ -55,6 +55,7 @@ android:layout_weight="0" android:scaleType="centerInside" android:background="@drawable/selectable_background" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu"/> diff --git a/res/layout/list_base.xml b/res/layout/list_base.xml index 6737eccc..b9193754 100644 --- a/res/layout/list_base.xml +++ b/res/layout/list_base.xml @@ -28,6 +28,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:cacheColorHint="@color/transparent" + android:background="@color/background_color" android:drawSelectorOnTop="false" android:divider="@null" android:dividerHeight="0dp" diff --git a/res/layout/list_item_common.xml b/res/layout/list_item_common.xml index 18c5a8d6..e9543a72 100644 --- a/res/layout/list_item_common.xml +++ b/res/layout/list_item_common.xml @@ -56,6 +56,7 @@ android:id="@+id/popup_menu_button" android:layout_width="@dimen/overflow_width" android:layout_height="@dimen/overflow_height" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> \ No newline at end of file diff --git a/res/layout/list_item_queue.xml b/res/layout/list_item_queue.xml index 5608e595..b539a64c 100644 --- a/res/layout/list_item_queue.xml +++ b/res/layout/list_item_queue.xml @@ -71,5 +71,6 @@ android:layout_height="@dimen/overflow_height" android:layout_alignParentEnd="true" android:layout_centerVertical="true" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> diff --git a/res/layout/list_item_simple.xml b/res/layout/list_item_simple.xml index aeefcb99..75622361 100644 --- a/res/layout/list_item_simple.xml +++ b/res/layout/list_item_simple.xml @@ -65,6 +65,7 @@ android:layout_height="@dimen/overflow_height" android:layout_alignParentEnd="true" android:layout_centerVertical="true" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> diff --git a/res/layout/list_item_top_tracks.xml b/res/layout/list_item_top_tracks.xml index 1d72be5e..35d0836f 100644 --- a/res/layout/list_item_top_tracks.xml +++ b/res/layout/list_item_top_tracks.xml @@ -95,6 +95,7 @@ android:id="@+id/popup_menu_button" android:layout_width="@dimen/overflow_width" android:layout_height="@dimen/overflow_height" + android:tint="@color/accent" android:src="@lineageos.platform:drawable/ic_menu" /> diff --git a/res/layout/loading_empty_container.xml b/res/layout/loading_empty_container.xml index c219b0f6..e9ff0eb3 100644 --- a/res/layout/loading_empty_container.xml +++ b/res/layout/loading_empty_container.xml @@ -23,6 +23,7 @@ android:layout_height="match_parent" android:layout_centerInParent="true" android:layout_gravity="center" + android:background="@color/background_color" android:gravity="center"> + + - - diff --git a/res/layout/playlist_detail_header.xml b/res/layout/playlist_detail_header.xml index a71e6e0b..7cceb7b2 100644 --- a/res/layout/playlist_detail_header.xml +++ b/res/layout/playlist_detail_header.xml @@ -57,6 +57,7 @@ android:layout_width="20dp" android:layout_height="20dp" android:scaleType="centerInside" + android:tint="@color/accent" android:src="@drawable/stopwatch_icon_white" /> + + + \ No newline at end of file diff --git a/res/values-night/styles.xml b/res/values-night/styles.xml new file mode 100644 index 00000000..578d800f --- /dev/null +++ b/res/values-night/styles.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/res/values-v27/styles.xml b/res/values-v27/styles.xml new file mode 100644 index 00000000..040fd483 --- /dev/null +++ b/res/values-v27/styles.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index be9c8183..d6c53c7f 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -15,32 +15,42 @@ limitations under the License. --> - - - - - + + @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary @lineageos.platform:color/color_default_primary_dark - #424242 - @lineageos.platform:color/color_default_accent + @lineageos.platform:color/color_default_primary_text + @lineageos.platform:color/color_default_secondary_text + @lineageos.platform:color/color_default_background + @lineageos.platform:color/color_default_foreground + @lineageos.platform:color/color_default_divider + @lineageos.platform:color/color_default_selector + @lineageos.platform:color/color_default_blue1 + @lineageos.platform:color/color_default_blue2 + @lineageos.platform:color/color_default_red1 + @lineageos.platform:color/color_default_orange1 + @lineageos.platform:color/color_default_green1 + @lineageos.platform:color/color_default_gray1 + @lineageos.platform:color/color_default_gray2 + @lineageos.platform:color/color_default_view_on_accent + + - @lineageos.platform:color/color_default_primary_text + @color/accent #333333 - #a0333333 #fafafa - #9e9e9e - #616161 + @color/color_default_gray1 + @color/color_default_gray2 #9C27B0 #673AB7 - #4CAF50 - #F44336 - #FF5722 + @color/color_default_green1 + @color/color_default_red1 + @color/color_default_orange1 #795548 #009688 - #3F51B5 + @color/color_default_blue1 #7B1FA2 #512DA8 #388E3C @@ -48,95 +58,78 @@ #F57C00 #5D4037 #00796B - #303F9F - - - @lineageos.platform:color/color_default_primary_text - @color/primary + @color/color_default_blue2 - @lineageos.platform:color/color_default_background - @color/black - #424242 + @color/background_color + @color/primary_text + @color/secondary_text - #00000000 - #99212121 - #99fafafa - #993F51B5 + @android:color/transparent - @color/header_action_bar_color - @color/primary - @lineageos.platform:color/color_default_primary_text + @color/primary_dark + @color/primary_text - @lineageos.platform:color/color_default_secondary_text - @lineageos.platform:color/color_default_primary_text - @color/default_text_color_light - @lineageos.platform:color/color_default_blue1 + @color/secondary_text + @color/accent + @color/primary_text - @color/primary - @color/main_action_bar_text_color - @color/header_action_bar_text_color - - @color/header_action_bar_text_color - @color/header_action_bar_text_color + @color/primary_dark + @color/primary_text + @color/secondary_text - - @color/white + @color/accent + @color/color_default_gray1 - #ea212121 - - - @color/transparent - @color/black + @color/foreground_color - #4cfafafa - @color/black - @color/accent - @color/default_text_color - @color/player_action_bar_title_text_color - #4c212121 - #34fafafa - #b3212121 + @color/background_color + @color/primary_text + @color/secondary_text + @color/primary_text + @color/primary_text + @color/divider_color + @color/secondary_text + @color/primary_text - @color/white - @color/white - @color/lineage_blue_color + @color/accent + @color/accent + @color/accent - @color/black + @color/secondary_text - @color/default_text_color_light + @color/primary_text - @color/player_control_background_color - @color/player_control_color - @color/white + @color/color_default_view_on_accent + @color/accent + @color/color_default_view_on_accent - @color/black - @color/main_action_bar_text_color + @color/primary_text + @color/secondary_text @color/transparent - @color/white + @color/primary_text #b2212121 - @color/grey - @color/white + @color/accent + @color/color_default_view_on_accent @color/letter_tile_purple_color - @color/letter_tile_blue_color @color/letter_tile_indigo_color @color/letter_tile_teal_color @color/letter_tile_light_green_color @@ -148,7 +141,6 @@ @color/letter_tile_purple_color_dark - @color/letter_tile_blue_color_dark @color/letter_tile_indigo_color_dark @color/letter_tile_teal_color_dark @color/letter_tile_light_green_color_dark @@ -162,16 +154,16 @@ #bffafafa - @color/black + @color/background_color @color/background_color @color/background_color @color/background_color @color/background_color @color/background_color - @color/default_text_color - @color/default_text_color - @color/default_text_color - @color/default_text_color + @color/primary_text + @color/primary_text + @color/primary_text + @color/primary_text ?android:textColorPrimaryInverse @color/cardOne @color/cardTwo @@ -179,17 +171,17 @@ @color/list_item_header_text_color @color/cardOne @color/cardTwo - @color/white - @color/white - @color/white + @color/color_default_view_on_accent + @color/primary_text + @color/primary_text @color/player_control_color @color/player_control_background_color @color/player_control_color - @color/player_control_background_color - @color/player_control_background_color - @color/player_control_background_color + @color/color_default_view_on_accent + @color/primary_text + @color/primary_text diff --git a/res/values/styles.xml b/res/values/styles.xml index c0d3803f..565ea349 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -17,7 +17,10 @@ --> - + + + + - - @@ -81,6 +99,7 @@ @@ -171,10 +190,12 @@ @@ -193,12 +214,17 @@ @dimen/tab_text_size - + -