|
|
|
@ -1,9 +1,7 @@ |
|
|
|
|
package io.legado.app.lib.theme.prefs |
|
|
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
|
import android.os.Build |
|
|
|
|
import android.util.AttributeSet |
|
|
|
|
import androidx.annotation.RequiresApi |
|
|
|
|
import androidx.appcompat.widget.SwitchCompat |
|
|
|
|
import androidx.preference.PreferenceViewHolder |
|
|
|
|
import androidx.preference.SwitchPreferenceCompat |
|
|
|
@ -11,21 +9,8 @@ import io.legado.app.R |
|
|
|
|
import io.legado.app.lib.theme.ATH |
|
|
|
|
import io.legado.app.lib.theme.ThemeStore |
|
|
|
|
|
|
|
|
|
class ATESwitchPreference : SwitchPreferenceCompat { |
|
|
|
|
|
|
|
|
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) |
|
|
|
|
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) |
|
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) |
|
|
|
|
|
|
|
|
|
constructor(context: Context) : super(context) |
|
|
|
|
class ATESwitchPreference(context: Context, attrs: AttributeSet) : |
|
|
|
|
SwitchPreferenceCompat(context, attrs) { |
|
|
|
|
|
|
|
|
|
override fun onBindViewHolder(holder: PreferenceViewHolder?) { |
|
|
|
|
super.onBindViewHolder(holder) |
|
|
|
|