Separate dropdown popups from settings pages

This commit is contained in:
ajp_anton
2026-07-28 04:06:32 +00:00
parent 591527750d
commit bb822736ab
4 changed files with 14 additions and 1 deletions
@@ -123,7 +123,8 @@ class LogDisplayFragment : Fragment(R.layout.fragment_log_display) {
private fun LinearLayout.addDropdown(label: String, values: List<String>, selected: Int, onSelected: (Int) -> Unit) {
addView(TextView(context).apply { text = label })
addView(Spinner(context).apply {
addView(Spinner(context, Spinner.MODE_DROPDOWN).apply {
setPopupBackgroundDrawable(context.getDrawable(R.drawable.dropdown_popup_background))
adapter = ArrayAdapter(context, android.R.layout.simple_spinner_dropdown_item, values)
setSelection(selected)
onItemSelectedListener = object : android.widget.AdapterView.OnItemSelectedListener {