Files
briar/briar-android/src/main/res/layout/activity_nav_drawer.xml
2019-11-01 11:47:35 -03:00

82 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".android.navdrawer.NavDrawerActivity">
<!-- The first child(root) is the content view -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/appBar"
layout="@layout/toolbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/expiryWarning"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/briar_warning_background"
android:orientation="horizontal"
android:padding="@dimen/margin_medium"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBar"
tools:visibility="visible">
<TextView
android:id="@+id/expiryWarningText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@plurals/expiry_warning"
android:textColor="@color/briar_text_primary_inverse"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toStartOf="@+id/expiryWarningClose"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/expiryWarningClose"
android:layout_width="24dp"
android:layout_height="0dp"
android:contentDescription="@string/close"
android:scaleType="center"
android:src="@drawable/ic_close"
android:tint="@color/briar_text_tertiary_inverse"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/expiryWarning" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- The second child is the menu -->
<include
layout="@layout/navigation_menu"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start" />
</androidx.drawerlayout.widget.DrawerLayout>