some changes to chat views

This commit is contained in:
0xd9a 2023-02-11 00:34:40 +05:30
parent 11547c56a8
commit 979354dc75
3 changed files with 85 additions and 79 deletions

View File

@ -11,7 +11,7 @@
</shape>
</rotate>
</item>
<item android:right="5dp">
<item android:right="6dp">
<shape android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
<corners android:radius="5dp" />

View File

@ -5,9 +5,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/fab_margin"
android:layout_marginTop="10dp"
android:layout_marginTop="12dp"
android:background="@drawable/bubble_right_tail"
android:padding="5dp">
android:padding="6dp"
android:paddingEnd="12dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/user_pp"
@ -34,7 +35,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="5dp"
android:gravity="end"
android:textColor="?attr/colorOnPrimary"
app:layout_constraintBottom_toBottomOf="@+id/user_pp"
@ -45,87 +45,19 @@
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/message_content"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginTop="6dp"
android:maxLines="10"
android:textColor="?attr/colorOnPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/user_pp"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/media_container"
<include
layout="@layout/layout_drawer_attachments"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="5dp"
app:layout_constraintStart_toEndOf="@+id/user_pp"
app:layout_constraintTop_toBottomOf="@+id/message_content">
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:layout_constraintTop_toBottomOf="@id/message_content" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
android:scaleType="centerCrop"
app:layout_constraintEnd_toStartOf="@+id/media2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/media1"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginEnd="1dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/media4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/media1"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginTop="1dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/media3"
app:layout_constraintTop_toBottomOf="@id/media2"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/more_media"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#88000000"
android:gravity="center"
android:scaleType="centerCrop"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/media4"
app:layout_constraintTop_toTopOf="@+id/media4"
tools:text="+7 more media" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media1"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_weight="1"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media2"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_marginStart="6dp"
android:layout_weight="1"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="6dp"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media3"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_weight="1"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />
<RelativeLayout
android:id="@+id/media4_container"
android:layout_width="0dp"
android:layout_height="150dp"
android:layout_marginStart="6dp"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/media4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/more_media"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#88000000"
android:gravity="center"
android:scaleType="centerCrop"
android:textColor="@color/white"
tools:text="+7 more media" />
</RelativeLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>