forked from upstream-mirrors/quik
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()
|
super.onFinishInflate()
|
||||||
updateView()
|
updateView()
|
||||||
|
|
||||||
setBackgroundResource(R.color.textSecondary)
|
setBackgroundResource(R.drawable.message_bubble)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateView() {
|
private fun updateView() {
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="@android:color/white" />
|
|
||||||
|
<corners android:radius="18dp" />
|
||||||
|
<solid android:color="@color/list_separator" />
|
||||||
|
|
||||||
</shape>
|
</shape>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:background="@color/textSecondary"
|
tools:background="@color/list_separator"
|
||||||
tools:parentTag="com.moez.QKSMS.ui.view.AvatarView">
|
tools:parentTag="com.moez.QKSMS.ui.view.AvatarView">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -15,10 +15,11 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/initial"
|
android:id="@+id/initial"
|
||||||
|
style="@style/TextPrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@android:color/white"
|
android:textAllCaps="true"
|
||||||
tools:text="M" />
|
tools:text="M" />
|
||||||
|
|
||||||
</merge>
|
</merge>
|
||||||
@@ -6,15 +6,15 @@
|
|||||||
android:gravity="start|bottom"
|
android:gravity="start|bottom"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingEnd="56dp"
|
android:paddingEnd="60dp"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
<com.moez.QKSMS.ui.view.AvatarView
|
<com.moez.QKSMS.ui.view.AvatarView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="40dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginEnd="16dp" />
|
android:layout_marginEnd="12dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -28,7 +28,13 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start"
|
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?" />
|
tools:text="Hey! How's it going?" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -37,6 +43,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
|
android:visibility="gone"
|
||||||
tools:text="2:50pm" />
|
tools:text="2:50pm" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
android:gravity="end|bottom"
|
android:gravity="end|bottom"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="12dp"
|
||||||
android:paddingStart="56dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -22,7 +22,13 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end"
|
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?" />
|
tools:text="Hey! How's it going?" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -31,14 +37,15 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
|
android:visibility="gone"
|
||||||
tools:text="2:50pm" />
|
tools:text="2:50pm" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.moez.QKSMS.ui.view.AvatarView
|
<com.moez.QKSMS.ui.view.AvatarView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="40dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginStart="16dp" />
|
android:layout_marginStart="12dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -6,4 +6,6 @@
|
|||||||
|
|
||||||
<color name="textPrimary">#2C3236</color>
|
<color name="textPrimary">#2C3236</color>
|
||||||
<color name="textSecondary">#898989</color>
|
<color name="textSecondary">#898989</color>
|
||||||
|
|
||||||
|
<color name="list_separator">#F2F2F2</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user