Fixed minor UI issues with files in chat bubbles
This commit is contained in:
parent
59a050ba54
commit
f33709d77b
3 changed files with 10 additions and 2 deletions
|
@ -82,6 +82,11 @@ fun View.setLayoutHeight(dimension: Float) {
|
|||
this.layoutParams.height = dimension.toInt()
|
||||
}
|
||||
|
||||
@BindingAdapter("android:maxHeight")
|
||||
fun ImageView.setImageMaxHeight(dimension: Float) {
|
||||
this.maxHeight = dimension.toInt()
|
||||
}
|
||||
|
||||
@BindingAdapter("android:layout_size")
|
||||
fun View.setLayoutSize(dimension: Float) {
|
||||
this.layoutParams.height = dimension.toInt()
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
android:onLongClick="@{longClickListener}"
|
||||
android:contentDescription="@string/content_description_downloaded_file_transfer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@{data.alone ? @dimen/chat_message_bubble_image_height_big : @dimen/chat_message_bubble_image_height_small, default=wrap_content}"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="@{data.alone ? @dimen/chat_message_bubble_image_height_big : @dimen/chat_message_bubble_image_height_small}"
|
||||
android:layout_margin="5dp"
|
||||
app:glidePath="@{data.content.filePath}"
|
||||
android:visibility="@{data.image ? View.VISIBLE : View.GONE}"
|
||||
|
@ -32,7 +33,8 @@
|
|||
android:onLongClick="@{longClickListener}"
|
||||
android:contentDescription="@string/content_description_downloaded_file_transfer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@{data.alone ? @dimen/chat_message_bubble_image_height_big : @dimen/chat_message_bubble_image_height_small, default=wrap_content}"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="@{data.alone ? @dimen/chat_message_bubble_image_height_big : @dimen/chat_message_bubble_image_height_small}"
|
||||
android:layout_margin="5dp"
|
||||
android:src="@{data.videoPreview}"
|
||||
android:visibility="@{data.video ? View.VISIBLE : View.GONE, default=gone}"
|
||||
|
|
|
@ -133,6 +133,7 @@
|
|||
app:layout="@{@layout/chat_message_content_cell}"
|
||||
app:onLongClick="@{contextMenuClickListener}"
|
||||
app:flexWrap="wrap"
|
||||
app:alignItems="center"
|
||||
app:justifyContent="@{viewModel.chatMessage.outgoing ? JustifyContent.FLEX_END : JustifyContent.FLEX_START}"/>
|
||||
|
||||
<org.linphone.activities.main.chat.views.MultiLineWrapContentWidthTextView
|
||||
|
|
Loading…
Reference in a new issue