fedilab-Android-App/app/src/main/res/layout/activity_main.xml

173 lines
8.0 KiB
XML
Raw Normal View History

2017-05-05 16:36:04 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
2017-07-10 10:33:24 +02:00
This file is a part of Mastalab
2017-05-05 16:36:04 +02:00
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.
2017-07-10 10:33:24 +02:00
Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
2017-05-05 16:36:04 +02:00
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
2017-08-04 11:11:27 +02:00
You should have received a copy of the GNU General Public License along with Mastalab; if not,
2017-05-05 16:36:04 +02:00
see <http://www.gnu.org/licenses>
-->
2017-08-13 11:30:28 +02:00
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
2017-05-05 16:36:04 +02:00
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"
2017-10-27 18:14:02 +02:00
tools:context="fr.gouv.etalab.mastodon.activities.MainActivity">
2017-05-05 16:36:04 +02:00
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
2017-05-05 16:36:04 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay"
>
2017-05-05 16:36:04 +02:00
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-05-05 16:36:04 +02:00
android:background="?attr/colorPrimary"
2017-10-27 18:05:57 +02:00
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="?attr/popupOverlay">
<ImageView
android:id="@+id/iconbar"
2017-10-28 19:40:55 +02:00
android:layout_width="30dp"
android:layout_height="30dp"
2018-12-10 07:34:14 +01:00
android:contentDescription="@string/open_menu" />
<LinearLayout
2017-08-24 18:05:57 +02:00
android:id="@+id/toolbar_search_container"
android:layout_width="match_parent"
2017-08-24 18:05:57 +02:00
android:layout_height="40dp"
android:orientation="horizontal">
<TextView
2017-09-23 14:51:59 +02:00
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
2017-09-23 14:14:15 +02:00
android:visibility="gone"
2017-08-24 18:05:57 +02:00
android:layout_width="0dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:textSize="16sp"
android:id="@+id/toolbar_title" />
2017-10-27 18:05:57 +02:00
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
2018-12-05 17:51:28 +01:00
app:tabMode="scrollable"
2017-10-27 18:05:57 +02:00
android:layout_width="0dp"
android:layout_weight="1"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
2017-11-02 14:44:14 +01:00
app:tabIndicatorHeight="0dp"
2017-10-27 18:05:57 +02:00
android:layout_height="wrap_content"
app:tabSelectedTextColor="?attr/colorAccent"
/>
2018-10-17 18:20:03 +02:00
<ImageView
2018-10-17 19:06:25 +02:00
android:layout_gravity="center_vertical"
2018-10-17 18:20:03 +02:00
android:visibility="gone"
android:id="@+id/delete_instance"
android:src="@drawable/ic_delete"
2018-12-10 07:34:14 +01:00
android:contentDescription="@string/delete_instance"
2018-10-17 18:20:03 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
2017-08-24 18:05:57 +02:00
<android.support.v7.widget.SearchView
android:background="@null"
android:id="@+id/toolbar_search"
android:gravity="end"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
2017-09-23 14:14:15 +02:00
2017-05-05 16:36:04 +02:00
</android.support.design.widget.AppBarLayout>
<!-- Framelayout to display Fragments -->
2017-10-24 17:56:42 +02:00
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/viewpager"
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"
2017-10-24 10:11:07 +02:00
tools:context="fr.gouv.etalab.mastodon.activities.MainActivity"
>
</android.support.v4.view.ViewPager>
2017-05-05 16:36:04 +02:00
<!-- Framelayout to display Fragments -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:visibility="gone"
2017-05-05 16:36:04 +02:00
android:id="@+id/main_app_container"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
2017-10-30 18:09:44 +01:00
app:layout_behavior="@string/appbar_scrolling_view_behavior"
2017-10-24 10:11:07 +02:00
tools:context="fr.gouv.etalab.mastodon.activities.MainActivity"
2017-05-05 16:36:04 +02:00
>
</RelativeLayout>
2017-10-27 18:05:57 +02:00
<android.support.design.widget.FloatingActionButton
android:id="@+id/toot"
2018-12-10 09:22:50 +01:00
android:contentDescription="@string/toot_it"
2017-10-27 18:05:57 +02:00
android:layout_width="wrap_content"
2017-05-05 16:36:04 +02:00
android:layout_height="wrap_content"
2017-10-27 18:05:57 +02:00
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
app:srcCompat="@drawable/ic_edit"
tools:ignore="VectorDrawableCompat" />
2017-10-30 07:54:02 +01:00
<android.support.design.widget.FloatingActionButton
android:id="@+id/delete_all"
android:visibility="gone"
2018-12-10 09:22:50 +01:00
android:contentDescription="@string/delete_all"
2017-10-30 07:54:02 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
2017-11-02 15:55:14 +01:00
app:srcCompat="@drawable/ic_delete_floating"
2017-10-30 07:54:02 +01:00
tools:ignore="VectorDrawableCompat" />
2017-11-23 18:16:47 +01:00
<android.support.design.widget.FloatingActionButton
android:id="@+id/add_new"
android:visibility="gone"
2018-12-10 09:22:50 +01:00
android:contentDescription="@string/add_new"
2017-11-23 18:16:47 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
2017-11-23 18:16:47 +01:00
app:srcCompat="@drawable/ic_action_add_new"
tools:ignore="VectorDrawableCompat" />
2018-08-20 19:00:20 +02:00
<android.support.design.widget.FloatingActionButton
android:id="@+id/federated_timeline"
2018-09-26 14:53:41 +02:00
android:layout_width="wrap_content"
2018-12-10 09:22:50 +01:00
android:contentDescription="@string/follow_instance"
2018-09-26 14:53:41 +02:00
android:layout_height="wrap_content"
2018-08-20 19:00:20 +02:00
app:fabSize="mini"
android:layout_gravity="bottom|start"
android:layout_margin="@dimen/fab_margin_floating"
app:srcCompat="@drawable/ic_public_world"
tools:ignore="VectorDrawableCompat" />
2017-05-05 16:36:04 +02:00
</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"
2017-09-23 12:08:52 +02:00
android:fitsSystemWindows="false"
2017-05-05 16:36:04 +02:00
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>