pull/1463/head^2
gedoor 3 years ago
parent 4e63e66788
commit 75ddba2730
  1. 2
      app/src/main/java/io/legado/app/ui/widget/prefs/SwitchPreference.kt

@ -36,10 +36,10 @@ class SwitchPreference(context: Context, attrs: AttributeSet) :
if (v is SwitchCompat && !v.isInEditMode) {
v.applyTint(context.accentColor)
}
super.onBindViewHolder(holder)
holder.itemView.setOnLongClickListener {
onLongClick?.invoke(this) ?: false
}
super.onBindViewHolder(holder)
}
fun onLongClick(listener: (preference: SwitchPreference) -> Boolean) {

Loading…
Cancel
Save