updating commons and target SDK to 31

This commit is contained in:
tibbi 2022-04-12 09:45:18 +02:00
parent 7ed5c667ef
commit 45874d13d4
18 changed files with 101 additions and 49 deletions

View file

@ -9,6 +9,7 @@ import android.widget.RelativeLayout
import android.widget.TextView
import com.simplemobiletools.commons.extensions.darkenColor
import com.simplemobiletools.commons.extensions.getContrastColor
import com.simplemobiletools.commons.extensions.getProperBackgroundColor
import com.simplemobiletools.commons.extensions.normalizeString
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
import com.simplemobiletools.commons.models.SimpleContact
@ -34,7 +35,7 @@ class AutoCompleteTextViewAdapter(val activity: SimpleActivity, val contacts: Ar
isFocusable = false
}
val backgroundColor = activity.config.backgroundColor
val backgroundColor = activity.getProperBackgroundColor()
findViewById<RelativeLayout>(R.id.item_contact_holder).setBackgroundColor(backgroundColor.darkenColor())
findViewById<TextView>(R.id.item_contact_name).setTextColor(backgroundColor.getContrastColor())