Improved settings screen
This commit is contained in:
parent
a83decd146
commit
960657878e
24 changed files with 229 additions and 129 deletions
|
@ -17,10 +17,12 @@ package code.name.monkey.retromusic.preferences
|
|||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.PreferenceDialogFragmentCompat
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.retromusic.R
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
||||
|
@ -30,13 +32,25 @@ import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
|||
class MaterialListPreference : ListPreference {
|
||||
private val mLayoutRes = R.layout.ate_preference_list
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
constructor(context: Context) : super(context) {
|
||||
init(context)
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
||||
private fun init(context: Context) {
|
||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||
init(context)
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
||||
init(context)
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
|
||||
init(context)
|
||||
}
|
||||
|
||||
override fun getDialogLayoutResource(): Int {
|
||||
return mLayoutRes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue