From 47b79550f13732040b64f515ee3d0f45d26df9a2 Mon Sep 17 00:00:00 2001 From: reduplicated <110570621+reduplicated@users.noreply.github.com> Date: Sun, 30 Oct 2022 23:15:43 +0100 Subject: [PATCH] color fixes --- .../cloudstream3/ui/home/HomeFragment.kt | 9 ++-- .../cloudstream3/ui/result/ResultFragment.kt | 1 + app/src/main/res/color/chip_color_text.xml | 5 ++ .../main/res/layout/fragment_downloads.xml | 49 +++++++++++-------- .../main/res/layout/fragment_extensions.xml | 3 ++ app/src/main/res/layout/fragment_home.xml | 16 +++--- app/src/main/res/values/colors.xml | 3 ++ app/src/main/res/values/styles.xml | 38 ++++++++------ 8 files changed, 78 insertions(+), 46 deletions(-) create mode 100644 app/src/main/res/color/chip_color_text.xml diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt index 78ca4bfe..e86a0742 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt @@ -6,7 +6,6 @@ import android.content.Context import android.content.DialogInterface import android.content.Intent import android.content.res.Configuration -import android.graphics.Color import android.net.Uri import android.os.Bundle import android.view.LayoutInflater @@ -72,6 +71,7 @@ import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showOptionSelectSt import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar +import com.lagradost.cloudstream3.utils.UIHelper.getResourceColor import com.lagradost.cloudstream3.utils.UIHelper.getSpanCount import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIconsAndNoStringRes import com.lagradost.cloudstream3.utils.UIHelper.setImage @@ -602,9 +602,10 @@ class HomeFragment : Fragment() { val searchText = home_search?.findViewById(androidx.appcompat.R.id.search_src_text) - searchText?.setTextColor(Color.WHITE) - searchText?.setHintTextColor(Color.WHITE) - + searchText?.context?.getResourceColor(R.attr.white)?.let { color -> + searchText.setTextColor(color) + searchText.setHintTextColor(color) + } observe(homeViewModel.apiName) { apiName -> currentApiName = apiName // setKey(USER_SELECTED_HOMEPAGE_API, apiName) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt index 3aae7fd2..db71b714 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt @@ -938,6 +938,7 @@ open class ResultFragment : ResultTrailerPlayer() { ) chip.setChipDrawable(chipDrawable) chip.text = tag + chip.isChecked = false chip.isCheckable = false chip.isFocusable = false chip.isClickable = false diff --git a/app/src/main/res/color/chip_color_text.xml b/app/src/main/res/color/chip_color_text.xml new file mode 100644 index 00000000..03d1e7b0 --- /dev/null +++ b/app/src/main/res/color/chip_color_text.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_downloads.xml b/app/src/main/res/layout/fragment_downloads.xml index 9ee5d716..f88e39d0 100644 --- a/app/src/main/res/layout/fragment_downloads.xml +++ b/app/src/main/res/layout/fragment_downloads.xml @@ -34,33 +34,42 @@ android:text="@string/download_storage_text" android:textColor="?attr/textColor" /> - + android:elevation="0dp" + app:cardCornerRadius="@dimen/storage_radius" + app:cardElevation="0dp" + app:cardMaxElevation="0dp"> - + android:orientation="horizontal"> - + - - + + + + + #121213 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index d6e7b65f..70ac7516 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -56,6 +56,7 @@ @color/colorPrimaryDark @color/colorAccent @color/textColor + @color/whiteText @color/grayTextColor @color/primaryGrayBackground @color/primaryBlackBackground @@ -78,6 +79,8 @@ @@ -145,7 +151,7 @@ @color/colorPrimaryBlue #4855A2 #5A6BCB - #5A6BCB + @color/whiteText @color/colorPrimaryBlue @@ -155,7 +161,7 @@ @color/colorPrimaryPurple #4704A3 #7125DB - #7125DB + @color/whiteText @color/colorPrimaryPurple @@ -164,7 +170,7 @@ @color/colorPrimaryGreen #007363 #39C1AE - #39C1AE + @color/blackText @color/colorPrimaryGreen @@ -173,7 +179,7 @@ @color/colorPrimaryGreenApple #319B5A #51C57E - #51C57E + @color/blackText @color/colorPrimaryGreenApple @@ -182,7 +188,7 @@ @color/colorPrimaryRed #B62B2B @color/colorPrimaryRed - @color/colorPrimaryRed + @color/whiteText @color/colorPrimaryRed @@ -192,7 +198,7 @@ @color/colorPrimaryBanana #9B7D31 #C5B251 - #C5A851 + @color/blackText @color/colorPrimaryBanana @@ -201,7 +207,7 @@ @color/colorPrimaryParty #C1495B #FD798C - #BF5968 + @color/blackText @color/colorPrimaryParty @@ -210,7 +216,7 @@ @color/colorPrimaryPink #DD1280 #FF4DAE - #DD1280 + @color/blackText @color/colorPrimaryPink @@ -219,7 +225,7 @@ @color/colorPrimaryCarnationPink #83366f #BD5DA5 - #BD5DA5 + @color/blackText @color/colorPrimaryCarnationPink @@ -229,7 +235,7 @@ @color/colorPrimaryMaroon #370C0C #451010 - #451010 + @color/whiteText @color/colorPrimaryMaroon @@ -239,7 +245,7 @@ @color/colorPrimaryDarkGreen #003d00 #004500 - #004500 + @color/whiteText @color/colorPrimaryDarkGreen @@ -249,7 +255,7 @@ @color/colorPrimaryNavyBlue #000073 #000080 - #000080 + @color/whiteText @color/colorPrimaryNavyBlue @@ -259,7 +265,7 @@ @color/colorPrimaryGrey #484848 #515151 - #515151 + @color/whiteText @color/colorPrimaryGrey @@ -269,7 +275,7 @@ @color/colorPrimaryWhite #CCCCCC #FFFFFF - #FFFFFF + @color/blackText @color/colorPrimaryWhite @@ -279,7 +285,7 @@ @color/colorPrimaryBrown #582700 #622C00 - #622C00 + @color/whiteText @color/colorPrimaryBrown