Create views

This commit is contained in:
Thomas 2023-02-10 18:17:44 +01:00
parent 25a72471a1
commit 9560bc6680
5 changed files with 161 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:left="5dp">
<shape>
<solid android:color="?attr/colorSecondary" />
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:right="20dp">
<rotate
android:fromDegrees="35"
android:pivotX="0%"
android:pivotY="100%"
android:toDegrees="0">
<shape android:shape="rectangle">
<solid android:color="?attr/colorSecondary" />
</shape>
</rotate>
</item>
<item android:left="5dp">
<shape android:shape="rectangle">
<solid android:color="?attr/colorSecondary" />
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:right="5dp">
<shape>
<solid android:color="?attr/colorPrimary" />
<corners android:radius="8dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:left="20dp">
<rotate
android:fromDegrees="-40"
android:pivotX="100%"
android:pivotY="100%"
android:toDegrees="0">
<shape android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
</shape>
</rotate>
</item>
<item android:right="5dp">
<shape android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/fab_margin"
android:layout_marginTop="10dp"
android:background="@drawable/bubble_right_tail"
android:padding="5dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/user_pp"
android:layout_width="50dp"
android:layout_height="50dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/user_name"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textColor="?attr/colorOnPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/user_pp"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/message_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
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"
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">
<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.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>