update chat customer and store

This commit is contained in:
shaulascr
2025-05-29 02:46:31 +07:00
parent 3075af3f7b
commit f4e130b93a
16 changed files with 1532 additions and 610 deletions

View File

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

View File

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

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#E3F2FD" />
<corners android:radius="8dp" />
<stroke
android:width="2dp"
android:color="#2196F3" />
</shape>

View File

@ -0,0 +1,87 @@
<?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:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="60dp"
android:paddingBottom="4dp">
<!-- Product bubble only - no text message -->
<LinearLayout
android:id="@+id/layoutMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/bg_message_received"
android:orientation="vertical"
android:maxWidth="280dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!-- Product card with horizontal layout -->
<LinearLayout
android:id="@+id/layoutProduct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp"
android:background="@android:color/transparent">
<ImageView
android:id="@+id/imgProduct"
android:layout_width="60dp"
android:layout_height="60dp"
android:scaleType="centerCrop"
android:background="@drawable/bg_product_inactive"
android:src="@drawable/placeholder_image" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/tvProductName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Claude AI Pro - Solusi AI Canggih 1 Bulan"
android:textColor="@android:color/black"
android:textSize="14sp"
android:textStyle="bold"
android:maxLines="2"
android:ellipsize="end" />
<TextView
android:id="@+id/tvProductPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Rp25.000"
android:textColor="#E91E63"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginTop="4dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvTimestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="2dp"
android:textColor="#888888"
android:textSize="10sp"
app:layout_constraintStart_toStartOf="@+id/layoutMessage"
app:layout_constraintTop_toBottomOf="@+id/layoutMessage"
tools:text="15:36" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,95 @@
<?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:paddingStart="60dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp">
<!-- Product bubble only - no text message -->
<LinearLayout
android:id="@+id/layoutMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_message_sent"
android:orientation="vertical"
android:maxWidth="280dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!-- Product card with horizontal layout -->
<LinearLayout
android:id="@+id/layoutProduct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp"
android:background="@android:color/transparent">
<ImageView
android:id="@+id/imgProduct"
android:layout_width="60dp"
android:layout_height="60dp"
android:scaleType="centerCrop"
android:background="@drawable/bg_product_inactive"
android:src="@drawable/placeholder_image" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/tvProductName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Claude AI Pro - Solusi AI Canggih 1 Bulan"
android:textColor="@android:color/black"
android:textSize="14sp"
android:textStyle="bold"
android:maxLines="2"
android:ellipsize="end" />
<TextView
android:id="@+id/tvProductPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Rp25.000"
android:textColor="#E91E63"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginTop="4dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tvTimestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="4dp"
android:textColor="#888888"
android:textSize="10sp"
app:layout_constraintEnd_toStartOf="@+id/imgStatus"
app:layout_constraintTop_toBottomOf="@+id/layoutMessage"
tools:text="15:35" />
<ImageView
android:id="@+id/imgStatus"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/check_double_24"
app:layout_constraintBottom_toBottomOf="@+id/tvTimestamp"
app:layout_constraintEnd_toEndOf="@+id/layoutMessage"
app:layout_constraintTop_toTopOf="@+id/tvTimestamp" />
</androidx.constraintlayout.widget.ConstraintLayout>