Apply selected state to custom boost field instead of relying on focus.

fork-5.53.8
Alex Hart 2021-12-10 10:29:15 -04:00 zatwierdzone przez Cody Henthorne
rodzic 3feb73789d
commit 7385112115
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -170,6 +170,7 @@ data class Boost(
custom.setText("")
}
custom.isSelected = model.isCustomAmountFocused
custom.setOnFocusChangeListener { _, hasFocus ->
model.onCustomAmountFocusChanged(hasFocus)
}

Wyświetl plik

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/rounded_outline_accent_38dp" android:state_focused="true" />
<item android:drawable="@drawable/rounded_outline_accent_38dp" android:state_selected="true" />
<item android:drawable="@drawable/rounded_outline_38dp" />
</selector>