mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-25 16:32:19 +00:00
Made message bubbles
This commit is contained in:
parent
e983b7b538
commit
61e660329d
13
app/src/main/res/drawable/message_item_left_background.xml
Normal file
13
app/src/main/res/drawable/message_item_left_background.xml
Normal 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>
|
10
app/src/main/res/drawable/message_item_right_background.xml
Normal file
10
app/src/main/res/drawable/message_item_right_background.xml
Normal 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>
|
41
app/src/main/res/layout/message_left_item.xml
Normal file
41
app/src/main/res/layout/message_left_item.xml
Normal 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>
|
45
app/src/main/res/layout/message_right_item.xml
Normal file
45
app/src/main/res/layout/message_right_item.xml
Normal 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>
|
Loading…
Reference in New Issue
Block a user