forked from upstream-mirrors/quik
Improve layout for MMS images
This commit is contained in:
@@ -83,6 +83,8 @@ class MessagesAdapter @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
view.messageBackground.clipToOutline = true
|
||||
|
||||
if (viewType != VIEWTYPE_ME) {
|
||||
view.avatar.contact = Contact().apply {
|
||||
numbers.add(PhoneNumber().apply { address = people[viewType] })
|
||||
@@ -119,6 +121,8 @@ class MessagesAdapter @Inject constructor(
|
||||
bindGrouping(view, position)
|
||||
|
||||
view.body.text = message.getText()
|
||||
view.body.setVisible(message.isSms() || view.body.text.isNotBlank())
|
||||
|
||||
view.timestamp.text = dateFormatter.getMessageTimestamp(message.date)
|
||||
}
|
||||
|
||||
|
||||
@@ -58,16 +58,12 @@
|
||||
android:background="@drawable/message_only"
|
||||
android:minHeight="36dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:backgroundTint="@color/tools_theme">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp" />
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<presentation.common.widget.TightTextView
|
||||
android:id="@+id/body"
|
||||
@@ -76,6 +72,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="all"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
app:textColor="primaryOnTheme"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
|
||||
@@ -52,16 +52,12 @@
|
||||
android:gravity="start"
|
||||
android:minHeight="36dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:backgroundTint="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp" />
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<presentation.common.widget.TightTextView
|
||||
android:id="@+id/body"
|
||||
@@ -70,6 +66,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="all"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:text="Hey! How's it going?" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user