Loading presentation/src/main/java/com/moez/QKSMS/common/util/TextViewStyler.kt +2 −1 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ class TextViewStyler @Inject constructor( else -> return } setTextColor(when (colorAttr) { COLOR_PRIMARY_ON_THEME -> context.getColorCompat(R.color.textPrimaryDark) COLOR_SECONDARY_ON_THEME -> context.getColorCompat(R.color.textSecondaryDark) Loading Loading @@ -132,7 +133,7 @@ class TextViewStyler @Inject constructor( setTextSize(textView, textSizeAttr) if (textView is EditText) { val drawable = textView.resources.getDrawable(R.drawable.cursor).apply { setTint(R.color.tools_theme) } val drawable = textView.resources.getDrawable(R.drawable.cursor) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { textView.textCursorDrawable = drawable } Loading presentation/src/main/java/com/moez/QKSMS/common/widget/QkSwitch.kt +2 −12 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ package com.moez.QKSMS.common.widget import android.content.Context import android.content.res.ColorStateList import android.util.AttributeSet import androidx.appcompat.widget.SwitchCompat import android.widget.Switch import com.moez.QKSMS.R import com.moez.QKSMS.common.util.Colors import com.moez.QKSMS.common.util.extensions.resolveThemeColor Loading @@ -30,7 +30,7 @@ import com.moez.QKSMS.injection.appComponent import com.moez.QKSMS.util.Preferences import javax.inject.Inject class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : SwitchCompat(context, attrs) { class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Switch(context, attrs) { @Inject lateinit var colors: Colors Loading @@ -52,16 +52,6 @@ class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? intArrayOf(-android.R.attr.state_enabled), intArrayOf(android.R.attr.state_checked), intArrayOf()) thumbTintList = ColorStateList(states, intArrayOf( context.resolveThemeColor(R.attr.switchThumbDisabled), context.getColor(R.color.tools_theme), context.resolveThemeColor(R.attr.switchThumbEnabled))) trackTintList = ColorStateList(states, intArrayOf( context.resolveThemeColor(R.attr.switchTrackDisabled), context.getColor(R.color.tools_theme).withAlpha(0x4D), context.resolveThemeColor(R.attr.switchTrackEnabled))) } } } No newline at end of file presentation/src/main/res/drawable/cursor.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/white" /> <solid android:color="@color/colorAccent" /> <size android:width="2dp" /> </shape> presentation/src/main/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ <color name="tools_theme">@lineageos.platform:color/color_default_accent</color> <color name="colorPrimary">@lineageos.platform:color/color_default_primary</color> <color name="colorPrimaryDark">@lineageos.platform:color/color_default_primary_dark</color> <color name="colorAccent">@lineageos.platform:color/color_default_accent</color> <color name="selection_color">#EAF5FD</color> </resources> presentation/src/main/res/values/themes.xml +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ <item name="bubbleColor">@color/bubbleLight</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="composeBackground">@color/backgroundLight</item> <item name="selectableItemBackground">@drawable/ripple</item> <item name="switchThumbEnabled">@color/switchThumbEnabledLight</item> Loading @@ -65,6 +66,7 @@ <item name="bubbleColor">@color/bubbleLight</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="composeBackground">@color/backgroundLight</item> <item name="selectableItemBackground">@drawable/ripple</item> <item name="windowActionBar">false</item> Loading Loading
presentation/src/main/java/com/moez/QKSMS/common/util/TextViewStyler.kt +2 −1 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ class TextViewStyler @Inject constructor( else -> return } setTextColor(when (colorAttr) { COLOR_PRIMARY_ON_THEME -> context.getColorCompat(R.color.textPrimaryDark) COLOR_SECONDARY_ON_THEME -> context.getColorCompat(R.color.textSecondaryDark) Loading Loading @@ -132,7 +133,7 @@ class TextViewStyler @Inject constructor( setTextSize(textView, textSizeAttr) if (textView is EditText) { val drawable = textView.resources.getDrawable(R.drawable.cursor).apply { setTint(R.color.tools_theme) } val drawable = textView.resources.getDrawable(R.drawable.cursor) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { textView.textCursorDrawable = drawable } Loading
presentation/src/main/java/com/moez/QKSMS/common/widget/QkSwitch.kt +2 −12 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ package com.moez.QKSMS.common.widget import android.content.Context import android.content.res.ColorStateList import android.util.AttributeSet import androidx.appcompat.widget.SwitchCompat import android.widget.Switch import com.moez.QKSMS.R import com.moez.QKSMS.common.util.Colors import com.moez.QKSMS.common.util.extensions.resolveThemeColor Loading @@ -30,7 +30,7 @@ import com.moez.QKSMS.injection.appComponent import com.moez.QKSMS.util.Preferences import javax.inject.Inject class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : SwitchCompat(context, attrs) { class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Switch(context, attrs) { @Inject lateinit var colors: Colors Loading @@ -52,16 +52,6 @@ class QkSwitch @JvmOverloads constructor(context: Context, attrs: AttributeSet? intArrayOf(-android.R.attr.state_enabled), intArrayOf(android.R.attr.state_checked), intArrayOf()) thumbTintList = ColorStateList(states, intArrayOf( context.resolveThemeColor(R.attr.switchThumbDisabled), context.getColor(R.color.tools_theme), context.resolveThemeColor(R.attr.switchThumbEnabled))) trackTintList = ColorStateList(states, intArrayOf( context.resolveThemeColor(R.attr.switchTrackDisabled), context.getColor(R.color.tools_theme).withAlpha(0x4D), context.resolveThemeColor(R.attr.switchTrackEnabled))) } } } No newline at end of file
presentation/src/main/res/drawable/cursor.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/white" /> <solid android:color="@color/colorAccent" /> <size android:width="2dp" /> </shape>
presentation/src/main/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ <color name="tools_theme">@lineageos.platform:color/color_default_accent</color> <color name="colorPrimary">@lineageos.platform:color/color_default_primary</color> <color name="colorPrimaryDark">@lineageos.platform:color/color_default_primary_dark</color> <color name="colorAccent">@lineageos.platform:color/color_default_accent</color> <color name="selection_color">#EAF5FD</color> </resources>
presentation/src/main/res/values/themes.xml +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ <item name="bubbleColor">@color/bubbleLight</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="composeBackground">@color/backgroundLight</item> <item name="selectableItemBackground">@drawable/ripple</item> <item name="switchThumbEnabled">@color/switchThumbEnabledLight</item> Loading @@ -65,6 +66,7 @@ <item name="bubbleColor">@color/bubbleLight</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="composeBackground">@color/backgroundLight</item> <item name="selectableItemBackground">@drawable/ripple</item> <item name="windowActionBar">false</item> Loading