mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-14 02:52:22 +00:00
fix chat activity
This commit is contained in:
@ -2,11 +2,12 @@
|
||||
<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:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/Theme.Ecommerce_serang"
|
||||
tools:context=".ui.chat.ChatActivity">
|
||||
|
||||
<!-- Top Toolbar -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/chatToolbar"
|
||||
android:layout_width="match_parent"
|
||||
@ -175,9 +176,23 @@
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/layoutChatInput"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvTypingIndicator"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardProduct" />
|
||||
|
||||
<!-- Typing indicator -->
|
||||
<TextView
|
||||
android:id="@+id/tvTypingIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="4dp"
|
||||
android:text="User is typing..."
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/layoutChatInput"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- Chat input area -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutChatInput"
|
||||
@ -196,7 +211,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Attachment"
|
||||
android:src="@drawable/ic_attachment" />
|
||||
android:src="@drawable/baseline_attach_file_24" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextMessage"
|
||||
@ -205,7 +220,9 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_edit_text_background"
|
||||
android:hint="Tulis pesan"
|
||||
android:fontFamily="@font/dmsans_regular"
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLines="4"
|
||||
android:minHeight="40dp"
|
||||
@ -218,60 +235,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Send"
|
||||
android:src="@drawable/ic_send" />
|
||||
android:src="@drawable/baseline_attach_file_24" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTypingIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="4dp"
|
||||
android:text="User is typing..."
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/layoutChatInput"
|
||||
tools:visibility="visible" />
|
||||
<!-- Bottom navigation -->
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomNavigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:elevation="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnHome"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Home"
|
||||
android:src="@drawable/ic_home" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnMenu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Menu"
|
||||
android:src="@drawable/ic_menu" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnNotification"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Notification"
|
||||
android:src="@drawable/ic_notification" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -3,8 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".ui.chat.ChatFragment">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/chatToolbar"
|
||||
@ -235,7 +234,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Attachment"
|
||||
android:src="@drawable/ic_attachment" />
|
||||
android:src="@drawable/baseline_attach_file_24" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextMessage"
|
||||
@ -244,7 +243,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_edit_text_rounded"
|
||||
android:background="@drawable/bg_edit_text_background"
|
||||
android:hint="Tulis pesan"
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLines="4"
|
||||
@ -258,7 +257,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Send"
|
||||
android:src="@drawable/ic_send" />
|
||||
android:src="@drawable/baseline_attach_file_24" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
@ -10,4 +10,10 @@
|
||||
android:layout_height="match_parent"
|
||||
android:text="Hello" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_trial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="trial button"/>
|
||||
|
||||
</FrameLayout>
|
@ -13,7 +13,7 @@
|
||||
android:id="@+id/imgAvatar"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/profile_placeholder"
|
||||
android:src="@drawable/ic_person"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/layoutMessage" />
|
||||
|
||||
|
Reference in New Issue
Block a user