• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2018 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License
16  -->
17
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    android:orientation="vertical"
22    android:layout_width="match_parent"
23    android:layout_height="match_parent"
24    android:clipToPadding="false"
25    android:id="@+id/root">
26
27    <androidx.appcompat.widget.Toolbar
28        android:id="@+id/toolbar"
29        android:layout_width="match_parent"
30        android:layout_height="?attr/actionBarSize"
31        />
32
33    <FrameLayout
34        android:id="@+id/scrollView"
35        android:layout_height="0dp"
36        android:layout_width="match_parent"
37        android:paddingStart="8dp"
38        android:paddingEnd="8dp"
39        android:layout_weight="1">
40
41        <LinearLayout
42            android:orientation="vertical"
43            android:layout_gravity="bottom"
44            android:layout_width="match_parent"
45            android:layout_height="wrap_content">
46
47            <TextView
48                android:layout_width="wrap_content"
49                android:layout_height="wrap_content"
50                style="@style/bubble"
51                android:text="Hey, look at this buttery smooth animation!" />
52            <TextView
53                android:layout_width="wrap_content"
54                android:layout_height="wrap_content"
55                style="@style/bubble_self"
56                android:text="Wow, that's pretty neat, how does this work?" />
57            <TextView
58                android:layout_width="wrap_content"
59                android:layout_height="wrap_content"
60                style="@style/bubble"
61                android:text="Using the new WindowInsets animation system of course!" />
62
63        </LinearLayout>
64
65    </FrameLayout>
66
67    <LinearLayout
68        android:layout_width="match_parent"
69        android:layout_height="wrap_content"
70        android:paddingStart="8dp"
71        android:paddingEnd="8dp"
72        android:id="@+id/editText">
73
74        <com.google.android.material.textfield.TextInputLayout
75            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
76            android:layout_width="0dp"
77            android:layout_height="wrap_content"
78            android:layout_weight="1">
79
80            <com.google.android.material.textfield.TextInputEditText
81                android:hint="Text message"
82                android:layout_width="match_parent"
83                android:layout_height="wrap_content"/>
84
85        </com.google.android.material.textfield.TextInputLayout>
86
87        <com.google.android.material.floatingactionbutton.FloatingActionButton
88            android:id="@+id/floating_action_button"
89            android:layout_width="wrap_content"
90            android:layout_height="wrap_content"
91            android:layout_gravity="center"
92            app:elevation="0dp"
93            app:fabSize="mini"
94            app:srcCompat="@drawable/ic_send"/>
95
96    </LinearLayout>
97</LinearLayout>
98
99