Skip to content

Instantly share code, notes, and snippets.

@Horizon733
Last active March 9, 2022 04:34
Show Gist options
  • Save Horizon733/5ed0646ed672647ff311b9f1155fee48 to your computer and use it in GitHub Desktop.
Save Horizon733/5ed0646ed672647ff311b9f1155fee48 to your computer and use it in GitHub Desktop.
Bot response chatbox for covid chatbot app
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="4dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/chat_msg_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="8dp"
android:background="@drawable/bot_chat"
android:gravity="start|center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/chat_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:padding="12dp"
android:layout_gravity="start"
tools:text="@tools:sample/full_names"
android:textColor="@color/colorPrimaryDark"
android:textSize="16sp" />
<TextView
android:id="@+id/message_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="4dp"
tools:text="@tools:sample/date/hhmm"
android:textColor="@color/colorPrimary"
android:textSize="12sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/button_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment