Improved settings screen
This commit is contained in:
parent
a83decd146
commit
960657878e
24 changed files with 229 additions and 129 deletions
|
@ -1,12 +1,13 @@
|
|||
package code.name.monkey.appthemehelper.common.prefs.supportv7
|
||||
|
||||
import android.content.Context
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import android.graphics.PorterDuff
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import code.name.monkey.appthemehelper.R
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.common.prefs.BorderCircleView
|
||||
|
||||
/**
|
||||
|
@ -35,6 +36,9 @@ class ATEColorPreference(context: Context, attrs: AttributeSet?, defStyleAttr: I
|
|||
layoutResource = R.layout.ate_preference_custom_support
|
||||
widgetLayoutResource = R.layout.ate_preference_color
|
||||
isPersistent = false
|
||||
|
||||
|
||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
|
|
|
@ -2,10 +2,12 @@ package code.name.monkey.appthemehelper.common.prefs.supportv7
|
|||
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Context
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import androidx.preference.CheckBoxPreference
|
||||
import code.name.monkey.appthemehelper.R
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
|
||||
/**
|
||||
* @author Aidan Follestad (afollestad)
|
||||
|
@ -31,5 +33,6 @@ class ATESwitchPreference : CheckBoxPreference {
|
|||
|
||||
private fun init() {
|
||||
widgetLayoutResource = R.layout.ate_preference_switch_support
|
||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingStart="72dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="@dimen/ate_preference_inset"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginLeft="@dimen/ate_preference_inset"
|
||||
android:layout_marginTop="12dip"
|
||||
android:layout_marginEnd="6dip"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue