Custom Payloads
Learn how to add actions & extra information to your messages and build a playful and engaging chat experience.
Schedule meetings on chat
Add the DatePickerDialog
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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="match_parent"
android:background="@android:color/white"
tools:context=".MainActivity">
<android.support.v7.widget.RecyclerView
android:id="@+id/chatRecyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/inputMessage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorGray"
app:layout_constraintTop_toBottomOf="@id/chatRecyclerView" />
<Button
android:id="@+id/sendButton"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Send"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/pickDateButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_date_range_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/sendButton"
app:layout_constraintTop_toBottomOf="@id/divider" />
<android.support.v7.widget.AppCompatEditText
android:id="@+id/inputMessage"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginBottom="10dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="20dp"
android:background="@android:color/white"
android:hint="Type your message"
android:inputType="textCapSentences"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/pickDateButton"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
Send a message with the picked date
Show the date message bubbles

Add action to the chat bubble buttons

Last updated