mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
added message bubbles in conversation
This commit is contained in:
@@ -29,7 +29,7 @@ class AvatarView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : Fr
|
||||
super.onFinishInflate()
|
||||
updateView()
|
||||
|
||||
setBackgroundResource(R.color.textSecondary)
|
||||
setBackgroundResource(R.drawable.message_bubble)
|
||||
}
|
||||
|
||||
private fun updateView() {
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
|
||||
<corners android:radius="18dp" />
|
||||
<solid android:color="@color/list_separator" />
|
||||
|
||||
</shape>
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/textSecondary"
|
||||
tools:background="@color/list_separator"
|
||||
tools:parentTag="com.moez.QKSMS.ui.view.AvatarView">
|
||||
|
||||
<ImageView
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/initial"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textAllCaps="true"
|
||||
tools:text="M" />
|
||||
|
||||
</merge>
|
||||
@@ -6,15 +6,15 @@
|
||||
android:gravity="start|bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="56dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="60dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<com.moez.QKSMS.ui.view.AvatarView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="16dp" />
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -28,7 +28,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:gravity="start"
|
||||
android:background="@drawable/message_bubble"
|
||||
android:gravity="start|center_vertical"
|
||||
android:minHeight="36dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:text="Hey! How's it going?" />
|
||||
|
||||
<TextView
|
||||
@@ -37,6 +43,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:visibility="gone"
|
||||
tools:text="2:50pm" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
android:gravity="end|bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingStart="56dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="60dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -22,7 +22,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="start"
|
||||
android:background="@drawable/message_bubble"
|
||||
android:gravity="start|center_vertical"
|
||||
android:minHeight="36dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:text="Hey! How's it going?" />
|
||||
|
||||
<TextView
|
||||
@@ -31,14 +37,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:visibility="gone"
|
||||
tools:text="2:50pm" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.moez.QKSMS.ui.view.AvatarView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp" />
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -6,4 +6,6 @@
|
||||
|
||||
<color name="textPrimary">#2C3236</color>
|
||||
<color name="textSecondary">#898989</color>
|
||||
|
||||
<color name="list_separator">#F2F2F2</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user