Made message bubbles

This commit is contained in:
ChronosX88 2019-03-26 22:24:49 +04:00
parent e983b7b538
commit 61e660329d
4 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="10dp"
android:topLeftRadius="0dp"/>
<stroke
android:width="1dp"
android:color="#ababb2"/>
<solid android:color="@android:color/background_light"/>
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="10dp"
android:topRightRadius="0dp"/>
<solid android:color="@color/colorPrimary"/>
</shape>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:padding="8dp"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true">
<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/contact_profile_image"
android:src="@mipmap/ic_launcher"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/message_item_left_background"
android:layout_toRightOf="@id/contact_profile_image"
android:text="Null"
android:paddingEnd="50dp"
android:layout_marginStart="4dp"
android:layout_marginTop="7dp"
android:id="@+id/message_text_left"
android:textSize="18sp"
android:padding="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/message_time_left"
android:layout_alignBottom="@+id/message_text_left"
android:layout_alignRight="@+id/message_text_left"
android:paddingBottom="3dp"
android:paddingRight="4dp"
android:text="12:00"/>
</RelativeLayout>
</RelativeLayout>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:padding="8dp"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/profile_image"
android:src="@mipmap/ic_launcher"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/message_item_right_background"
android:text="Null"
android:layout_toLeftOf="@id/profile_image"
android:layout_marginEnd="4dp"
android:layout_marginTop="7dp"
android:id="@+id/message_text_right"
android:textSize="18sp"
android:paddingEnd="50dp"
android:textColor="#ffffff"
android:padding="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/message_time_right"
android:layout_alignBottom="@+id/message_text_right"
android:layout_alignRight="@+id/message_text_right"
android:paddingBottom="3dp"
android:textColor="#ffffff"
android:paddingRight="4dp"
android:text="12:00"/>
</RelativeLayout>
</RelativeLayout>