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