summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/InformationView.kt12
1 files changed, 11 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/InformationView.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/InformationView.kt
index b9d3fee793..3d4dc2b691 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/InformationView.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/InformationView.kt
@@ -41,6 +41,12 @@ open class InformationView : LinearLayout {
private val informationDisplay: TextView = findViewById(R.id.information_display)
private val spinner: View = findViewById(R.id.spinner)
+ var shouldEnable = false
+ set(value) {
+ field = value
+ updateEnabled()
+ }
+
var information: String? = null
set(value) {
field = value
@@ -119,6 +125,10 @@ open class InformationView : LinearLayout {
informationDisplay.visibility = VISIBLE
}
- setEnabled(information != null)
+ updateEnabled()
+ }
+
+ private fun updateEnabled() {
+ setEnabled(shouldEnable && information != null)
}
}