summaryrefslogtreecommitdiffhomepage
path: root/android/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'android/src/main')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/InformationView.kt13
-rw-r--r--android/src/main/res/values/attrs.xml1
2 files changed, 14 insertions, 0 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 fed5ab8c28..934c2efa25 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
@@ -54,6 +54,13 @@ open class InformationView : LinearLayout {
updateStatus()
}
+ var informationColor = context.resources.getColor(R.color.white)
+ set(value) {
+ field = value
+ informationDisplay.setTextColor(value)
+ updateStatus()
+ }
+
var whenMissing = WhenMissing.Nothing
set(value) {
field = value
@@ -101,6 +108,12 @@ open class InformationView : LinearLayout {
context.theme.obtainStyledAttributes(attributes, styleableId, 0, 0).apply {
try {
description.text = getString(R.styleable.InformationView_description) ?: ""
+
+ informationColor = getInteger(
+ R.styleable.InformationView_informationColor,
+ informationColor
+ )
+
whenMissing = WhenMissing.fromCode(
getInteger(R.styleable.InformationView_whenMissing, 0)
)
diff --git a/android/src/main/res/values/attrs.xml b/android/src/main/res/values/attrs.xml
index bda6c3b9b6..f44c4e8e4e 100644
--- a/android/src/main/res/values/attrs.xml
+++ b/android/src/main/res/values/attrs.xml
@@ -14,6 +14,7 @@
</declare-styleable>
<declare-styleable name="InformationView">
<attr name="description" format="reference|string"/>
+ <attr name="informationColor" format="reference|color"/>
<attr name="whenMissing" format="enum">
<enum name="nothing" value="0"/>
<enum name="hide" value="1"/>