From a9214e6a0e1bc6545e21b57c35cbd551d7fbe7b9 Mon Sep 17 00:00:00 2001 From: kinnerapriyap Date: Mon, 17 Aug 2020 17:15:22 +0900 Subject: [PATCH 1/3] Add attrs for selected spinner text --- sher-gil/src/main/res/values/attrs.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sher-gil/src/main/res/values/attrs.xml b/sher-gil/src/main/res/values/attrs.xml index cf5fde1..2af3f71 100644 --- a/sher-gil/src/main/res/values/attrs.xml +++ b/sher-gil/src/main/res/values/attrs.xml @@ -16,6 +16,8 @@ + + From 5328052d4627646610275fd394828b4ef500a04b Mon Sep 17 00:00:00 2001 From: kinnerapriyap Date: Mon, 17 Aug 2020 17:16:12 +0900 Subject: [PATCH 2/3] Separate spinner views for control and dropdown --- .../kinnerapriyap/sugar/ShergilActivity.kt | 2 +- .../layout/album_spinner_dropdown_item.xml | 35 +++++++++++++++++++ .../main/res/layout/album_spinner_item.xml | 4 +-- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 sher-gil/src/main/res/layout/album_spinner_dropdown_item.xml diff --git a/sher-gil/src/main/java/com/kinnerapriyap/sugar/ShergilActivity.kt b/sher-gil/src/main/java/com/kinnerapriyap/sugar/ShergilActivity.kt index 9bb57bf..b3284d4 100644 --- a/sher-gil/src/main/java/com/kinnerapriyap/sugar/ShergilActivity.kt +++ b/sher-gil/src/main/java/com/kinnerapriyap/sugar/ShergilActivity.kt @@ -158,7 +158,7 @@ internal class ShergilActivity : mediaGalleryAlbumCursorAdapter = MediaGalleryAlbumCursorAdapter(this, viewModel.fetchAlbumCursor()) .also { adapter -> - adapter.setDropDownViewResource(R.layout.album_spinner_item) + adapter.setDropDownViewResource(R.layout.album_spinner_dropdown_item) } binding.albumSpinner.adapter = mediaGalleryAlbumCursorAdapter binding.albumSpinner.onItemSelectedListener = this diff --git a/sher-gil/src/main/res/layout/album_spinner_dropdown_item.xml b/sher-gil/src/main/res/layout/album_spinner_dropdown_item.xml new file mode 100644 index 0000000..2887d5f --- /dev/null +++ b/sher-gil/src/main/res/layout/album_spinner_dropdown_item.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/sher-gil/src/main/res/layout/album_spinner_item.xml b/sher-gil/src/main/res/layout/album_spinner_item.xml index 2887d5f..82d7643 100644 --- a/sher-gil/src/main/res/layout/album_spinner_item.xml +++ b/sher-gil/src/main/res/layout/album_spinner_item.xml @@ -12,7 +12,7 @@ android:layout_height="wrap_content" android:ellipsize="marquee" android:singleLine="true" - android:textColor="?attr/shergil_toolbarSpinnerAlbumNameText" + android:textColor="?attr/shergil_toolbarSelectedSpinnerAlbumNameText" android:textSize="16sp" app:layout_constraintBottom_toTopOf="@id/mediaCount" app:layout_constraintStart_toStartOf="parent" @@ -25,7 +25,7 @@ android:layout_height="wrap_content" android:ellipsize="marquee" android:singleLine="true" - android:textColor="?attr/shergil_toolbarSpinnerAlbumCountText" + android:textColor="?attr/shergil_toolbarSelectedSpinnerAlbumCountText" android:textSize="14sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="@id/albumName" From 09118f8544b7f10f30a021d97976dd800a32f6fc Mon Sep 17 00:00:00 2001 From: kinnerapriyap Date: Mon, 17 Aug 2020 17:16:22 +0900 Subject: [PATCH 3/3] Add default values --- sher-gil/src/main/res/values/styles.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sher-gil/src/main/res/values/styles.xml b/sher-gil/src/main/res/values/styles.xml index e6583bb..d25c695 100644 --- a/sher-gil/src/main/res/values/styles.xml +++ b/sher-gil/src/main/res/values/styles.xml @@ -25,6 +25,8 @@ #000000 #000000 #000000 + #ffffff + #ffffff @style/Shergil.BottomBar