From eeb458b9b538c47e9ab77ed9ec46e7064daa4718 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 Apr 2020 22:08:19 +0200 Subject: [PATCH] use a helper function for setting up the letters scrollbar --- app/build.gradle | 2 +- .../activities/NewConversationActivity.kt | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c9990489..7b2fcf06 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,7 +36,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.25.13' + implementation 'com.simplemobiletools:commons:5.25.14' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'com.klinkerapps:android-smsmms:5.2.6' diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt index 3daea057..a2b4071d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewConversationActivity.kt @@ -1,7 +1,6 @@ package com.simplemobiletools.smsmessenger.activities import android.content.Intent -import android.content.res.ColorStateList import android.net.Uri import android.os.Bundle import android.view.WindowManager @@ -78,15 +77,7 @@ class NewConversationActivity : SimpleActivity() { } } - val states = arrayOf(intArrayOf(android.R.attr.state_enabled), - intArrayOf(-android.R.attr.state_enabled), - intArrayOf(-android.R.attr.state_checked), - intArrayOf(android.R.attr.state_pressed) - ) - val textColor = config.textColor - val colors = intArrayOf(textColor, textColor, textColor, textColor) - val myList = ColorStateList(states, colors) - contacts_letter_fastscroller.textColor = myList + contacts_letter_fastscroller.textColor = config.textColor.getColorStateList() contacts_letter_fastscroller_thumb.setupWithFastScroller(contacts_letter_fastscroller) contacts_letter_fastscroller_thumb.textColor = config.primaryColor.getContrastColor() }