2018-10-31 12:03:36 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-01-16 18:25:43 +00:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
2018-10-31 12:03:36 +00:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-10 16:43:06 +00:00
|
|
|
android:addStatesFromChildren="true"
|
|
|
|
android:background="?attr/selectableItemBackground"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:paddingLeft="8dp"
|
|
|
|
android:paddingRight="8dp">
|
2018-10-31 12:03:36 +00:00
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/messageAvatarImageView"
|
2019-05-07 15:20:24 +00:00
|
|
|
android:layout_width="44dp"
|
|
|
|
android:layout_height="44dp"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:layout_marginTop="4dp"
|
2018-10-31 12:03:36 +00:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:src="@tools:sample/avatars" />
|
|
|
|
|
2019-05-10 16:12:35 +00:00
|
|
|
<androidx.constraintlayout.widget.Guideline
|
2019-05-10 16:43:06 +00:00
|
|
|
android:id="@+id/messageStartGuideline"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-10 16:43:06 +00:00
|
|
|
android:orientation="vertical"
|
|
|
|
tools:layout_constraintGuide_begin="44dp" />
|
2019-05-10 16:12:35 +00:00
|
|
|
|
2018-10-31 12:03:36 +00:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/messageMemberNameView"
|
2019-05-14 09:07:53 +00:00
|
|
|
android:layout_width="wrap_content"
|
2018-10-31 12:03:36 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginLeft="8dp"
|
|
|
|
android:layout_marginTop="4dp"
|
2019-05-10 16:43:06 +00:00
|
|
|
android:layout_marginEnd="4dp"
|
2019-03-18 13:56:08 +00:00
|
|
|
android:layout_marginRight="8dp"
|
2018-10-31 12:03:36 +00:00
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="1"
|
2019-06-05 13:58:00 +00:00
|
|
|
android:textColor="?riotx_text_primary"
|
2019-01-14 15:46:16 +00:00
|
|
|
android:textSize="15sp"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:textStyle="bold"
|
2019-05-14 09:07:53 +00:00
|
|
|
app:layout_constrainedWidth="true"
|
2018-10-31 12:03:36 +00:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/messageTimeView"
|
2019-05-14 09:07:53 +00:00
|
|
|
app:layout_constraintHorizontal_bias="0"
|
|
|
|
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
2019-05-10 16:12:35 +00:00
|
|
|
app:layout_constraintStart_toEndOf="@id/messageStartGuideline"
|
2018-10-31 12:03:36 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2019-05-29 12:19:40 +00:00
|
|
|
tools:text="@sample/matrix.json/data/displayName" />
|
2018-10-31 12:03:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/messageTimeView"
|
2019-05-14 09:07:53 +00:00
|
|
|
android:layout_width="wrap_content"
|
2018-10-31 12:03:36 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="8dp"
|
2019-03-18 13:56:08 +00:00
|
|
|
android:layout_marginLeft="8dp"
|
2019-06-05 13:58:00 +00:00
|
|
|
android:textColor="?riotx_text_secondary"
|
2019-05-14 09:07:53 +00:00
|
|
|
android:textSize="12sp"
|
|
|
|
app:layout_constraintBaseline_toBaselineOf="@id/messageMemberNameView"
|
2018-10-31 12:03:36 +00:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-05-14 09:07:53 +00:00
|
|
|
app:layout_constraintStart_toEndOf="@id/messageMemberNameView"
|
2018-10-31 12:03:36 +00:00
|
|
|
tools:text="@tools:sample/date/hhmm" />
|
|
|
|
|
2019-05-10 16:12:35 +00:00
|
|
|
|
|
|
|
<ViewStub
|
|
|
|
android:id="@+id/messageContentTextStub"
|
|
|
|
style="@style/TimelineContentStubLayoutParams"
|
|
|
|
android:inflatedId="@id/messageTextView"
|
|
|
|
android:layout="@layout/item_timeline_event_text_message_stub"
|
2019-05-10 16:43:06 +00:00
|
|
|
tools:ignore="MissingConstraints"
|
|
|
|
tools:visibility="visible" />
|
2019-05-10 16:12:35 +00:00
|
|
|
|
|
|
|
<ViewStub
|
|
|
|
android:id="@+id/messageContentMediaStub"
|
|
|
|
style="@style/TimelineContentStubLayoutParams"
|
2019-06-03 15:53:04 +00:00
|
|
|
android:inflatedId="@+id/messageContentMedia"
|
2019-05-10 16:12:35 +00:00
|
|
|
android:layout="@layout/item_timeline_event_media_message_stub"
|
|
|
|
tools:ignore="MissingConstraints" />
|
|
|
|
|
|
|
|
<ViewStub
|
|
|
|
android:id="@+id/messageContentFileStub"
|
|
|
|
style="@style/TimelineContentStubLayoutParams"
|
|
|
|
android:layout="@layout/item_timeline_event_file_stub"
|
|
|
|
tools:ignore="MissingConstraints" />
|
2018-10-31 12:03:36 +00:00
|
|
|
|
2019-05-17 15:15:44 +00:00
|
|
|
<ViewStub
|
|
|
|
android:id="@+id/messageContentRedactedStub"
|
|
|
|
style="@style/TimelineContentStubLayoutParams"
|
|
|
|
android:layout_height="20dp"
|
2019-05-20 07:53:12 +00:00
|
|
|
android:layout_marginEnd="56dp"
|
|
|
|
android:layout_marginRight="56dp"
|
2019-05-17 15:15:44 +00:00
|
|
|
android:layout="@layout/item_timeline_event_redacted_stub"
|
|
|
|
tools:ignore="MissingConstraints" />
|
2018-10-31 12:03:36 +00:00
|
|
|
|
2019-05-15 11:24:13 +00:00
|
|
|
|
2019-05-14 09:07:53 +00:00
|
|
|
<!-- TODO: For now we show 8 reactions maximum, this will need rework when needed-->
|
2019-05-15 11:24:13 +00:00
|
|
|
<ViewStub
|
2019-05-14 09:07:53 +00:00
|
|
|
android:id="@+id/messageBottomInfo"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2019-05-20 07:53:12 +00:00
|
|
|
android:layout_marginBottom="4dp"
|
|
|
|
android:inflatedId="@+id/messageBottomInfo"
|
2019-05-15 11:24:13 +00:00
|
|
|
android:layout="@layout/item_timeline_event_bottom_reactions_stub"
|
2019-05-14 09:07:53 +00:00
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toEndOf="@id/messageStartGuideline"
|
|
|
|
app:layout_constraintVertical_chainStyle="packed"
|
|
|
|
tools:visibility="visible">
|
|
|
|
|
2019-05-15 11:24:13 +00:00
|
|
|
</ViewStub>
|
2019-05-14 09:07:53 +00:00
|
|
|
|
|
|
|
|
2019-01-16 18:25:43 +00:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|