Updated navigation drawer
New drawer design
This commit is contained in:
parent
eccd2f2212
commit
02922df3ef
4 changed files with 44 additions and 69 deletions
|
|
@ -1,17 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget_preview.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.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"
|
||||
android:fitsSystemWindows="true"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<include
|
||||
|
|
@ -19,7 +13,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<android.support.design.widget_preview.NavigationView
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -28,58 +22,4 @@
|
|||
app:headerLayout="@layout/nav_header_break_reminder"
|
||||
app:menu="@menu/activity_break_reminder_drawer" />
|
||||
|
||||
</android.support.v4.widget_preview.DrawerLayout>
|
||||
-->
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
|
||||
<include layout="@layout/content_break_reminder" />
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/white"
|
||||
app:menu="@menu/activity_break_reminder_drawer"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
@ -7,7 +7,8 @@
|
|||
android:fitsSystemWindows="true"
|
||||
tools:context="orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder.BreakReminder">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
|
@ -27,5 +28,4 @@
|
|||
|
||||
<include layout="@layout/content_break_reminder" />
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
|
|||
39
app/src/main/res/layout/nav_header_break_reminder.xml
Normal file
39
app/src/main/res/layout/nav_header_break_reminder.xml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
android:background="@drawable/drawer_header"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:src="@mipmap/ic_drawer_logo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/imageView"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textColor="@color/darkblue"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -6,14 +6,10 @@
|
|||
android:id="@+id/nav_settings"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
android:title="@string/title_activity_settings" />
|
||||
</group>
|
||||
<group android:id="@+id/group2">
|
||||
<item
|
||||
android:id="@+id/nav_help"
|
||||
android:icon="@drawable/ic_help"
|
||||
android:title="@string/help" />
|
||||
</group>
|
||||
<group android:id="@+id/group3">
|
||||
<item
|
||||
android:id="@+id/nav_about"
|
||||
android:icon="@drawable/ic_about"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue