mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
use proper colors at the SpeedDial activity
This commit is contained in:
@ -2,6 +2,7 @@ package com.simplemobiletools.contacts.pro.activities
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import com.simplemobiletools.contacts.pro.R
|
import com.simplemobiletools.contacts.pro.R
|
||||||
import com.simplemobiletools.contacts.pro.adapters.SpeedDialAdapter
|
import com.simplemobiletools.contacts.pro.adapters.SpeedDialAdapter
|
||||||
import com.simplemobiletools.contacts.pro.dialogs.SelectContactsDialog
|
import com.simplemobiletools.contacts.pro.dialogs.SelectContactsDialog
|
||||||
@ -25,6 +26,8 @@ class ManageSpeedDialActivity : SimpleActivity(), RemoveSpeedDialListener {
|
|||||||
ContactsHelper(this).getContacts { contacts ->
|
ContactsHelper(this).getContacts { contacts ->
|
||||||
allContacts = contacts
|
allContacts = contacts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateTextColors(manage_speed_dial_scrollview)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
|
@ -67,10 +67,14 @@ class SpeedDialAdapter(activity: SimpleActivity, var speedDialValues: ArrayList<
|
|||||||
|
|
||||||
private fun setupView(view: View, speedDial: SpeedDial) {
|
private fun setupView(view: View, speedDial: SpeedDial) {
|
||||||
view.apply {
|
view.apply {
|
||||||
var text = "${speedDial.id}. "
|
var displayName = "${speedDial.id}. "
|
||||||
text += if (speedDial.isValid()) speedDial.displayName else ""
|
displayName += if (speedDial.isValid()) speedDial.displayName else ""
|
||||||
speed_dial_label.text = text
|
|
||||||
speed_dial_label.isSelected = selectedKeys.contains(speedDial.hashCode())
|
speed_dial_label.apply {
|
||||||
|
text = displayName
|
||||||
|
isSelected = selectedKeys.contains(speedDial.hashCode())
|
||||||
|
setTextColor(textColor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user