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

214 lines
8.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 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 android:id="@+id/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: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"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText" />
<com.moez.QKSMS.common.widget.QkEditText
android:id="@+id/toolbarSearch"
style="@style/ToolbarText"
android:layout_marginEnd="16dp"
android:hint="@string/title_conversations"
android:textColorHint="?android:attr/textColorTertiary"
app:textSize="primary"
tools:textSize="16sp" />
</androidx.appcompat.widget.Toolbar>
<com.moez.QKSMS.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:paddingBottom="8dp"
android:paddingTop="8dp"
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"
android:tint="@color/white"
app:layout_constraintBottom_toTopOf="@id/bottom"
app:layout_constraintEnd_toEndOf="parent"
tools:backgroundTint="@color/tools_theme" />
<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/bottomDivider" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/bottomDivider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="top"
app:constraint_referenced_ids="snackbarTitle, snackbarMessage, syncingLabel, syncingProgress" />
<androidx.constraintlayout.widget.Group
android:id="@+id/snackbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="snackbarTitle, snackbarMessage, snackbarButton"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Group
android:id="@+id/syncing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="syncingProgress,syncingLabel"
tools:visibility="gone" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/snackbarTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:paddingTop="16dp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/snackbarMessage"
app:layout_constraintEnd_toStartOf="@id/snackbarButton"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:textColor="primary"
app:textSize="primary"
tools:text="Love texting again" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/snackbarMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="2dp"
android:paddingBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/snackbarButton"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:textColor="secondary"
app:textSize="secondary"
tools:text="Make QKSMS your default SMS app" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/snackbarButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="?attr/selectableItemBackground"
android:padding="16dp"
android:textAllCaps="true"
android:textColor="@color/tools_theme"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/snackbarMessage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/snackbarTitle"
app:textColor="theme"
app:textSize="secondary"
tools:text="Change" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/syncingLabel"
style="@style/TextPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:paddingTop="16dp"
android:text="@string/main_syncing"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/syncingProgress" />
<ProgressBar
android:id="@+id/syncingProgress"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:indeterminate="true"
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>