summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt
index ba8b887064..d80506a5dd 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt
@@ -28,7 +28,7 @@ open class InformationView : LinearLayout {
}
}
- private val container =
+ private val container: View =
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE).let { service ->
val inflater = service as LayoutInflater
@@ -56,7 +56,9 @@ open class InformationView : LinearLayout {
var shouldEnable by observable(false) { _, _, _ -> updateEnabled() }
- var onClick: (() -> Unit)? = null
+ var onClick by observable<(() -> Unit)?>(null) { _, _, callback ->
+ container.setFocusable(callback != null)
+ }
constructor(context: Context) : super(context) {}