165 lines
7.5 KiB
XML
165 lines
7.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2017 Thomas Schneider
|
|
|
|
This file is a part of Mastalab
|
|
|
|
This program 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.
|
|
|
|
Mastalab 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 Mastalab; if not,
|
|
see <http://www.gnu.org/licenses>
|
|
-->
|
|
<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"
|
|
tools:openDrawer="start">
|
|
|
|
<android.support.design.widget.CoordinatorLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context="mastodon.etalab.gouv.fr.mastodon.fr.etalab.gouv.fr.mastodon.activities.MainActivity">
|
|
|
|
<android.support.design.widget.AppBarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
>
|
|
<android.support.v7.widget.Toolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:theme="@style/AppTheme.AppBarOverlay"
|
|
android:background="?attr/colorPrimary"
|
|
app:popupTheme="?attr/popupOverlay">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="40dp"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:id="@+id/pp_actionBar"
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:gravity="center_vertical"
|
|
tools:ignore="ContentDescription"/>
|
|
|
|
<TextView
|
|
android:id="@+id/toolbar_title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_weight="1"
|
|
android:textSize="16sp"/>
|
|
|
|
<android.support.v7.widget.SearchView
|
|
android:id="@+id/toolbar_search"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:background="@null"
|
|
android:gravity="end"/>
|
|
</LinearLayout>
|
|
|
|
<android.support.design.widget.TabLayout
|
|
android:id="@+id/tabLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp"
|
|
app:tabGravity="fill"
|
|
app:tabMaxWidth="0dp"
|
|
app:tabSelectedTextColor="?attr/colorAccent">
|
|
|
|
<android.support.design.widget.TabItem
|
|
android:id="@+id/tab_home"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:icon="@drawable/ic_action_home_tl"/>
|
|
|
|
<android.support.design.widget.TabItem
|
|
android:id="@+id/tab_local"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:icon="@drawable/ic_action_users_tl"/>
|
|
|
|
<android.support.design.widget.TabItem
|
|
android:id="@+id/tab_global"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:icon="@drawable/ic_action_globe_tl"/>
|
|
|
|
<android.support.design.widget.TabItem
|
|
android:id="@+id/tab_notification"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:icon="@drawable/ic_notifications_tl"/>
|
|
</android.support.design.widget.TabLayout>
|
|
</LinearLayout>
|
|
</android.support.v7.widget.Toolbar>
|
|
|
|
</android.support.design.widget.AppBarLayout>
|
|
|
|
|
|
|
|
<!-- Framelayout to display Fragments -->
|
|
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/viewpager"
|
|
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"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
tools:context="mastodon.etalab.gouv.fr.mastodon.fr.etalab.gouv.fr.mastodon.activities.MainActivity"
|
|
>
|
|
</android.support.v4.view.ViewPager>
|
|
|
|
<!-- Framelayout to display Fragments -->
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:visibility="gone"
|
|
android:id="@+id/main_app_container"
|
|
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"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
tools:context="mastodon.etalab.gouv.fr.mastodon.fr.etalab.gouv.fr.mastodon.activities.MainActivity"
|
|
>
|
|
</RelativeLayout>
|
|
|
|
|
|
<android.support.design.widget.FloatingActionButton
|
|
android:id="@+id/toot"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom|end"
|
|
android:layout_margin="@dimen/fab_margin"
|
|
app:srcCompat="@drawable/ic_action_edit" />
|
|
|
|
</android.support.design.widget.CoordinatorLayout>
|
|
|
|
<android.support.design.widget.NavigationView
|
|
android:id="@+id/nav_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start"
|
|
android:fitsSystemWindows="true"
|
|
app:headerLayout="@layout/nav_header_main"
|
|
app:menu="@menu/activity_main_drawer" />
|
|
|
|
</android.support.v4.widget.DrawerLayout> |