Improve LTM's lightning bolt in Home screen.
- Changed the color of the lightning bolt icon for LTM accounts, so that it is black in day mode and white in night mode. - Increased the size of the lightning bolt icon to match the letters size and added a bit more separation between them.
This commit is contained in:
parent
25087fd483
commit
84617f376c
2 changed files with 8 additions and 8 deletions
|
@ -86,11 +86,11 @@ class HomeFragment : Fragment() {
|
||||||
tvAccountName.text = userAccount.name
|
tvAccountName.text = userAccount.name
|
||||||
if (userAccount.isLtm) {
|
if (userAccount.isLtm) {
|
||||||
// Add the lightning bolt to the start of the account name if it is LTM
|
// Add the lightning bolt to the start of the account name if it is LTM
|
||||||
tvAccountName.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
tvAccountName.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
resources.getDrawable(R.drawable.ic_ltm_account, null), null, null, null
|
R.drawable.ic_ltm_account, 0, 0, 0
|
||||||
)
|
)
|
||||||
// Add some padding so that the lightning bolt icon is not too close to the account name text
|
// Add some padding so that the lightning bolt icon is not too close to the account name text
|
||||||
tvAccountName.compoundDrawablePadding = 4
|
tvAccountName.compoundDrawablePadding = 12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="9dp"
|
android:width="12dp"
|
||||||
android:height="18dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="12.0"
|
android:viewportWidth="12.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#337ab5"
|
android:fillColor="?android:textColorPrimary"
|
||||||
android:pathData="M0,14 h5 l-3,9 l10,-12 h-5 l3,-9 z"/>
|
android:pathData="M0,14 h5 l-3,9 l10,-12 h-5 l3,-9 z"/>
|
||||||
</vector>
|
</vector>
|
Loading…
Reference in a new issue