Added new style for switch
This commit is contained in:
parent
39b0b4c931
commit
b0605ff183
10 changed files with 108 additions and 63 deletions
|
@ -30,7 +30,6 @@ class ATESwitchPreference : CheckBoxPreference {
|
|||
}
|
||||
|
||||
private fun init() {
|
||||
layoutResource = R.layout.ate_preference_custom_support
|
||||
widgetLayoutResource = R.layout.ate_preference_switch_support
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package code.name.monkey.appthemehelper.common.views
|
||||
|
||||
import android.content.Context
|
||||
import androidx.appcompat.widget.SwitchCompat
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
|
||||
import androidx.appcompat.widget.SwitchCompat
|
||||
import code.name.monkey.appthemehelper.ATH
|
||||
import code.name.monkey.appthemehelper.R
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
|
||||
|
||||
|
@ -27,6 +27,9 @@ class ATESwitch : SwitchCompat {
|
|||
}
|
||||
|
||||
private fun init(context: Context, attrs: AttributeSet?) {
|
||||
setThumbResource(R.drawable.toggle_switch)
|
||||
setTrackResource(R.drawable.ate_track)
|
||||
background = null
|
||||
ATH.setTint(this, ThemeStore.accentColor(context))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue