diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt index ff762823..2ed36864 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/fragments/MyViewPagerFragment.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.contacts.pro.fragments import android.content.Context import android.content.Intent +import android.content.res.ColorStateList import android.util.AttributeSet import android.view.ViewGroup import androidx.coordinatorlayout.widget.CoordinatorLayout @@ -153,6 +154,19 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) if (!wasLetterFastScrollerSetup) { wasLetterFastScrollerSetup = true + + 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) + letter_fastscroller.textColor = myList + letter_fastscroller.setupWithRecyclerView(fragment_list, { position -> try { val name = contacts[position].getNameToDisplay()