commit 9b2b76d4a9161b8407806d2fbf38375aa90d65b5
parent 2bc9c14049472a6b4f6dbbe8c4a79f0529e89ba3
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Sat, 20 May 2023 01:02:35 +0200
fix: view appearance
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/ui/menus/ViewAppearanceHelper.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/ui/menus/ViewAppearanceHelper.kt
@@ -8,17 +8,18 @@ import android.view.Gravity
import android.view.View
import android.widget.Switch
import android.widget.TextView
+import me.rhunk.snapenhance.Constants
object ViewAppearanceHelper {
fun applyIndentation(view: TextView) {
view.setPadding(70, 0, 55, 0)
}
- @SuppressLint("UseSwitchCompatOrMaterialCode", "RtlHardcoded")
+ @SuppressLint("UseSwitchCompatOrMaterialCode", "RtlHardcoded", "DiscouragedApi")
fun applyTheme(viewModel: View, view: TextView) {
//remove the shadow
view.setBackgroundColor(0x00000000)
- view.setTextColor(viewModel.resources.getColor(android.R.color.white, null))
+ view.setTextColor(viewModel.resources.getColor(viewModel.resources.getIdentifier("sig_color_text_primary_light", "color", Constants.SNAPCHAT_PACKAGE_NAME), null))
view.setShadowLayer(0f, 0f, 0f, 0)
view.outlineProvider = null
view.gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL