File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
kotlin/com/simplemobiletools/smsmessenger/activities Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import android.app.Activity
55import android.content.Intent
66import android.graphics.BitmapFactory
77import android.graphics.drawable.Drawable
8+ import android.graphics.drawable.LayerDrawable
89import android.media.MediaMetadataRetriever
910import android.net.Uri
1011import android.os.Bundle
@@ -467,11 +468,19 @@ class ThreadActivity : SimpleActivity() {
467468 }
468469
469470 private fun showSelectedContacts () {
471+ val adjustedColor = getAdjustedPrimaryColor()
472+ val selectedContactBg = resources.getDrawable(R .drawable.item_selected_contact_background)
473+ (selectedContactBg as LayerDrawable ).findDrawableByLayerId(R .id.selected_contact_bg).applyColorFilter(adjustedColor)
474+
470475 val views = ArrayList <View >()
471476 participants.forEach {
472477 val contact = it
473478 layoutInflater.inflate(R .layout.item_selected_contact, null ).apply {
479+ selected_contact_holder.background = selectedContactBg
474480 selected_contact_name.text = contact.name
481+ selected_contact_name.setTextColor(adjustedColor.getContrastColor())
482+ selected_contact_remove.applyColorFilter(adjustedColor.getContrastColor())
483+
475484 selected_contact_remove.setOnClickListener {
476485 if (contact.rawId != participants.first().rawId) {
477486 removeSelectedContact(contact.rawId)
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <shape xmlns : android =" http://schemas.android.com/apk/res/android"
3- android : shape =" rectangle" >
2+ <layer-list xmlns : android =" http://schemas.android.com/apk/res/android" >
3+ <item android : id =" @+id/selected_contact_bg" >
4+ <shape android : shape =" rectangle" >
45
5- <corners android : radius =" @dimen/normal_margin" />
6+ <corners android : radius =" @dimen/normal_margin" />
67
7- <solid android : color =" @color/activated_item_foreground " />
8+ <solid android : color =" @color/md_grey_white " />
89
9- </shape >
10+ </shape >
11+ </item >
12+ </layer-list >
You can’t perform that action at this time.
0 commit comments