Fix media preview bugs (#3160)
* fix media preview layout issues * make sure "ALT" label is never shown when media preview is hidden
This commit is contained in:
parent
865ba5909f
commit
98eb324aa0
3 changed files with 37 additions and 38 deletions
|
|
@ -184,12 +184,11 @@ class MediaPreviewLayout(context: Context, attrs: AttributeSet? = null) :
|
|||
}
|
||||
}
|
||||
|
||||
inline fun forEachIndexed(action: (Int, View, MediaPreviewImageView, TextView) -> Unit) {
|
||||
inline fun forEachIndexed(action: (Int, MediaPreviewImageView, TextView) -> Unit) {
|
||||
for (index in 0 until childCount) {
|
||||
val wrapper = getChildAt(index)
|
||||
action(
|
||||
index,
|
||||
wrapper,
|
||||
wrapper.findViewById(R.id.preview_image_view) as MediaPreviewImageView,
|
||||
wrapper.findViewById(R.id.preview_media_description_indicator) as TextView
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue