File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
app/src/main/kotlin/com/simplemobiletools/contacts/activities Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import android.app.SearchManager
44import android.content.Context
55import android.content.Intent
66import android.graphics.drawable.ColorDrawable
7+ import android.graphics.drawable.Drawable
78import android.net.Uri
89import android.os.Bundle
910import android.os.Handler
@@ -369,12 +370,16 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
369370 invalidateOptionsMenu()
370371 }
371372
372- private fun getTabIcon (position : Int ) = resources.getDrawable(when (position) {
373- LOCATION_CONTACTS_TAB -> R .drawable.ic_person
374- LOCATION_FAVORITES_TAB -> R .drawable.ic_star_on
375- LOCATION_RECENTS_TAB -> R .drawable.ic_clock
376- else -> R .drawable.ic_group
377- })
373+ private fun getTabIcon (position : Int ): Drawable {
374+ val drawableId = when (position) {
375+ LOCATION_CONTACTS_TAB -> R .drawable.ic_person
376+ LOCATION_FAVORITES_TAB -> R .drawable.ic_star_on
377+ LOCATION_RECENTS_TAB -> R .drawable.ic_clock
378+ else -> R .drawable.ic_group
379+ }
380+
381+ return resources.getColoredDrawableWithColor(drawableId, config.textColor)
382+ }
378383
379384 private fun showSortingDialog () {
380385 ChangeSortingDialog (this ) {
You can’t perform that action at this time.
0 commit comments