mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Fix bad rendering of file item if the filename is long
This commit is contained in:
parent
643a2baabf
commit
1b66d1f746
1 changed files with 44 additions and 42 deletions
|
@ -2,53 +2,55 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/messageFileLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageFileLayout"
|
||||
<ImageView
|
||||
android:id="@+id/messageFilee2eIcon"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/e2e_verified"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- the media type -->
|
||||
<ImageView
|
||||
android:id="@+id/messageFileImageView"
|
||||
android:layout_width="@dimen/chat_avatar_size"
|
||||
android:layout_height="@dimen/chat_avatar_size"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/messageFilee2eIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/filetype_image" />
|
||||
|
||||
<!-- the media -->
|
||||
<TextView
|
||||
android:id="@+id/messageFilenameView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginRight="32dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:duplicateParentState="true"
|
||||
android:orientation="horizontal"
|
||||
android:autoLink="none"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/chat_avatar_size"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintStart_toEndOf="@+id/messageFileImageView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="A filename here" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageFilee2eIcon"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/e2e_verified"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- the media type -->
|
||||
<ImageView
|
||||
android:id="@+id/messageFileImageView"
|
||||
android:layout_width="@dimen/chat_avatar_size"
|
||||
android:layout_height="@dimen/chat_avatar_size"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:src="@drawable/filetype_image" />
|
||||
|
||||
<!-- the media -->
|
||||
<TextView
|
||||
android:id="@+id/messageFilenameView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/chat_avatar_size"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_weight="1"
|
||||
android:autoLink="none"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="A filename here" />
|
||||
|
||||
</LinearLayout>
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/horizontalBarrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="messageFileImageView,messageFilenameView" />
|
||||
|
||||
<include
|
||||
android:id="@+id/messageFileUploadProgressLayout"
|
||||
|
@ -58,10 +60,10 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginRight="32dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/messageFileLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/horizontalBarrier"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in a new issue