diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt index c7c871b7e1..c70cc6400e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt @@ -25,7 +25,8 @@ class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: Att FrameLayout(context, attrs) { private var entries = emptyList() - private var selectedPosition = 0 + var selectedPosition = 0 + private set private var pref: Preference? = null private var prefOffset = 0 private var popup: PopupMenu? = null @@ -63,6 +64,12 @@ class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: Att binding.detailView.text = entries.firstOrNull().orEmpty() + popup = makeSettingsPopup() + setOnTouchListener(popup?.dragToOpenListener) + setOnClickListener { + popup?.show() + } + a.recycle() }