Files
quik/presentation/src/main/res/layout/main_activity.xml
T

149 lines
6.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.drawerlayout.widget.DrawerLayout 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/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:animateLayoutChanges="true"
app:contentInsetStartWithNavigation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<dev.octoshrimpy.quik.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText"
android:layout_marginStart="16dp"
android:visibility="gone" />
<dev.octoshrimpy.quik.common.widget.QkEditText
android:id="@+id/toolbarSearch"
style="@style/ToolbarText"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:minHeight="40dp"
android:background="@drawable/rounded_rectangle_24dp"
android:backgroundTint="?attr/bubbleColor"
android:hint="@string/title_conversations"
android:inputType="text"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColorHint="?android:attr/textColorTertiary"
app:textSize="primary"
tools:textSize="16sp"
android:focusable="true"
android:nextFocusRight="@+id/compose" />
</androidx.appcompat.widget.Toolbar>
<dev.octoshrimpy.quik.common.widget.QkTextView
android:id="@+id/empty"
style="@style/TextSecondary"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:gravity="center"
android:padding="56dp"
app:layout_constraintBottom_toTopOf="@id/bottom"
app:layout_constraintTop_toBottomOf="@id/toolbar"
tools:text="Your conversations will appear here"
tools:visibility="invisible" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingTop="8dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/bottom"
app:layout_constraintTop_toBottomOf="@id/toolbar"
tools:listitem="@layout/conversation_list_item" />
<ImageView
android:id="@+id/compose"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="16dp"
android:background="@drawable/circle_ripple"
android:contentDescription="@string/main_fab_cd"
android:elevation="8dp"
android:padding="16dp"
android:src="@drawable/ic_add_black_24dp"
app:layout_constraintBottom_toTopOf="@id/bottom"
app:layout_constraintEnd_toEndOf="parent"
tools:backgroundTint="@color/tools_theme"
app:tint="@color/white" />
<View
android:layout_width="0dp"
android:layout_height="8dp"
android:background="@drawable/ab_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<View
android:id="@+id/bottom"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider"
app:layout_constraintBottom_toTopOf="@id/snackbar" />
<ViewStub
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inflatedId="@id/snackbar"
android:layout="@layout/main_permission_hint"
app:layout_constraintBottom_toTopOf="@id/syncing" />
<ViewStub
android:id="@+id/syncing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inflatedId="@id/syncing"
android:layout="@layout/main_syncing"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/drawer"
layout="@layout/drawer_view"
android:layout_width="320dp"
android:layout_height="match_parent"
android:layout_gravity="start" />
</androidx.drawerlayout.widget.DrawerLayout>