优化UI
This commit is contained in:
@@ -50,7 +50,12 @@ class FamilySwitchAdapter(
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
fun bind(item: FamilyItem, isSelected: Boolean) {
|
||||
binding.tvFamilyName.text = item.name
|
||||
val displayName = if (item.role == "appadmin") {
|
||||
binding.root.context.getString(R.string.my_family_admin, item.name)
|
||||
} else {
|
||||
binding.root.context.getString(R.string.family_member, item.name)
|
||||
}
|
||||
binding.tvFamilyName.text = displayName
|
||||
|
||||
binding.root.setBackgroundColor(
|
||||
ContextCompat.getColor(
|
||||
|
||||
Reference in New Issue
Block a user