summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-10-08 13:36:48 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-10-19 11:51:48 +0000
commiteafa145f1ffed826845f789a0c01bde05a1427cb (patch)
tree6334faec3faf58c343597965f98bd34e23de7af8 /android
parent633a13a4b189f6d10748e94441e7709e0698b6db (diff)
downloadmullvadvpn-eafa145f1ffed826845f789a0c01bde05a1427cb.tar.xz
mullvadvpn-eafa145f1ffed826845f789a0c01bde05a1427cb.zip
Make cell buttons focusable
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Cell.kt1
-rw-r--r--android/src/main/res/drawable/cell_button_background.xml9
2 files changed, 9 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Cell.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Cell.kt
index cb87408251..a533b5e758 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Cell.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Cell.kt
@@ -43,6 +43,7 @@ open class Cell : LinearLayout {
val leftPadding = resources.getDimensionPixelSize(R.dimen.cell_left_padding)
val rightPadding = resources.getDimensionPixelSize(R.dimen.cell_right_padding)
+ setFocusable(true)
isClickable = true
gravity = Gravity.CENTER
orientation = HORIZONTAL
diff --git a/android/src/main/res/drawable/cell_button_background.xml b/android/src/main/res/drawable/cell_button_background.xml
index e00f49464d..857a8386e1 100644
--- a/android/src/main/res/drawable/cell_button_background.xml
+++ b/android/src/main/res/drawable/cell_button_background.xml
@@ -1,10 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="false">
+ <item android:state_pressed="false"
+ android:state_focused="false">
<shape android:shape="rectangle">
<solid android:color="@color/blue" />
</shape>
</item>
+ <item android:state_pressed="false"
+ android:state_focused="true">
+ <shape android:shape="rectangle">
+ <solid android:color="@color/blue60" />
+ </shape>
+ </item>
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/blue80" />