mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-09 08:38:43 +01:00
Changes content description of chevron based on expanded state
This commit is contained in:
parent
8892fac062
commit
e9120c8e33
@ -46,14 +46,19 @@ abstract class NewSpaceSummaryItem : VectorEpoxyModel<NewSpaceSummaryItem.Holder
|
||||
|
||||
override fun bind(holder: Holder) {
|
||||
super.bind(holder)
|
||||
val context = holder.root.context
|
||||
holder.root.onClick(onSpaceSelectedListener)
|
||||
holder.root.setOnLongClickListener { onLongClickListener?.invoke(holder.root).let { true } }
|
||||
holder.root.setOnLongClickListener {
|
||||
onLongClickListener?.invoke(holder.root)
|
||||
true
|
||||
}
|
||||
holder.name.text = matrixItem.displayName
|
||||
holder.root.isChecked = selected
|
||||
|
||||
holder.chevron.setOnClickListener(onToggleExpandListener)
|
||||
holder.chevron.isVisible = hasChildren
|
||||
holder.chevron.setImageResource(if (expanded) R.drawable.ic_expand_more else R.drawable.ic_arrow_right)
|
||||
holder.chevron.contentDescription = context.getString(if (expanded) R.string.a11y_collapse_space_children else R.string.a11y_expand_space_children)
|
||||
|
||||
avatarRenderer.render(matrixItem, holder.avatar)
|
||||
holder.unreadCounter.render(countState)
|
||||
|
@ -66,7 +66,6 @@
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:contentDescription="@string/a11y_expand_space_children"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -142,6 +142,7 @@
|
||||
<string name="change_space">Change Space</string>
|
||||
<string name="explore_rooms">Explore Rooms</string>
|
||||
<string name="a11y_expand_space_children">Expand space children</string>
|
||||
<string name="a11y_collapse_space_children">Collapse space children</string>
|
||||
|
||||
<!-- Last seen time -->
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user