diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-08-14 21:11:49 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-08-18 13:13:31 +0000 |
| commit | dd3f4b59375b4e05727947ef7c231d45d590994b (patch) | |
| tree | a62608df1e59b1275a11aaf2888922d92466e6b2 /android | |
| parent | fdf572cab37004248f003ac00497d2ec0bc57982 (diff) | |
| download | mullvadvpn-dd3f4b59375b4e05727947ef7c231d45d590994b.tar.xz mullvadvpn-dd3f4b59375b4e05727947ef7c231d45d590994b.zip | |
Change hostname color if tunnel info. is expanded
Diffstat (limited to 'android')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/LocationInfo.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/LocationInfo.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/LocationInfo.kt index 77e09f47d0..c46d4a3b3f 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/LocationInfo.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/LocationInfo.kt @@ -10,6 +10,9 @@ import net.mullvad.talpid.net.Endpoint import net.mullvad.talpid.net.TransportProtocol class LocationInfo(val parentView: View, val context: Context) { + private val hostnameColorCollapsed = context.getColor(R.color.white40) + private val hostnameColorExpanded = context.getColor(R.color.white) + private val country: TextView = parentView.findViewById(R.id.country) private val city: TextView = parentView.findViewById(R.id.city) private val tunnelInfo: View = parentView.findViewById(R.id.tunnel_info) @@ -85,11 +88,13 @@ class LocationInfo(val parentView: View, val context: Context) { chevron.visibility = View.VISIBLE if (isTunnelInfoExpanded) { + hostname.setTextColor(hostnameColorExpanded) chevron.rotation = 180.0F protocol.setText(R.string.wireguard) showInAddress(endpoint) updateOutAddress(location) } else { + hostname.setTextColor(hostnameColorCollapsed) chevron.rotation = 0.0F protocol.text = "" inAddress.text = "" |
