mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
using the colored circle icons at groups too
This commit is contained in:
@ -25,8 +25,6 @@ import java.util.*
|
||||
class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val refreshListener: RefreshContactsListener?, recyclerView: MyRecyclerView,
|
||||
fastScroller: FastScroller, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) {
|
||||
|
||||
private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt()
|
||||
private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt()
|
||||
private var textToHighlight = ""
|
||||
|
||||
var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||
@ -165,17 +163,11 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
|
||||
setTextColor(textColor)
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize)
|
||||
text = groupTitle
|
||||
|
||||
if (showContactThumbnails) {
|
||||
setPadding(smallPadding, bigPadding, bigPadding, bigPadding)
|
||||
} else {
|
||||
setPadding(bigPadding, bigPadding, bigPadding, bigPadding)
|
||||
}
|
||||
}
|
||||
|
||||
group_tmb.beVisibleIf(showContactThumbnails)
|
||||
if (showContactThumbnails) {
|
||||
group_tmb.applyColorFilter(textColor)
|
||||
group_tmb.setImageDrawable(activity.getColoredGroupIcon(group.title))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user