Skip to content

Instantly share code, notes, and snippets.

@jisungbin
Created January 8, 2022 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jisungbin/a85887ace1888221bce6f52bb4396518 to your computer and use it in GitHub Desktop.
Save jisungbin/a85887ace1888221bce6f52bb4396518 to your computer and use it in GitHub Desktop.
<LinearLayout 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="@drawable/shape_rect"
android:backgroundTint="@color/color_on_surface_5"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/Widget.MaterialComponents.Toolbar.Surface"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/spacing_micro">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?attr/textAppearanceHeadline6" />
</com.google.android.material.appbar.MaterialToolbar>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/conversation_recyclerview"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingVertical="@dimen/spacing_small"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:reverseLayout="true"
tools:itemCount="20"
tools:listitem="@layout/message_bubble_other" />
<LinearLayout
android:id="@+id/message_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:elevation="@dimen/spacing_micro"
android:padding="@dimen/spacing_small">
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_micro"
android:layout_weight="1">
<EditText
android:id="@+id/message_edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="no"
android:hint="@string/message_hint"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<ImageButton
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:contentDescription="@null"
android:minWidth="48dp"
android:minHeight="48dp"
android:padding="@dimen/spacing_medium"
app:srcCompat="@drawable/ic_send"
app:tint="?attr/colorPrimary" />
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment