use a helper function for setting up the letters scrollbar

This commit is contained in:
tibbi 2020-04-13 22:08:19 +02:00
parent 9b758b617d
commit eeb458b9b5
2 changed files with 2 additions and 11 deletions

View File

@ -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'

View File

@ -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()
}