use a helper function for fetching the FAB icon color

This commit is contained in:
tibbi 2020-03-28 19:25:21 +01:00
parent 2562eca6ba
commit 11e7d051d4
3 changed files with 3 additions and 4 deletions

View file

@ -57,7 +57,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.23.8'
implementation 'com.simplemobiletools:commons:5.24.2'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'

View file

@ -163,8 +163,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
}
}
val iconColor = if (isBlackAndWhiteTheme()) Color.BLACK else config.primaryColor.getContrastColor()
val dialpadIcon = resources.getColoredDrawableWithColor(R.drawable.ic_dialpad_vector, iconColor)
val dialpadIcon = resources.getColoredDrawableWithColor(R.drawable.ic_dialpad_vector, getFABIconColor())
main_dialpad_button.apply {
setImageDrawable(dialpadIcon)
background.applyColorFilter(getAdjustedPrimaryColor())

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.70'
ext.kotlin_version = '1.3.71'
repositories {
google()