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

169 lines
7.5 KiB
XML
Raw Normal View History

2019-09-06 17:55:14 +02:00
<?xml version="1.0" encoding="utf-8"?><!--
2017-05-05 16:36:04 +02:00
Copyright 2017 Thomas Schneider
2019-05-18 11:10:30 +02:00
This file is a part of Fedilab
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.
2019-05-18 11:10:30 +02:00
Fedilab 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.
2019-05-18 11:10:30 +02:00
You should have received a copy of the GNU General Public License along with Fedilab; if not,
2017-05-05 16:36:04 +02:00
see <http://www.gnu.org/licenses>
-->
2019-09-06 17:55:14 +02:00
<androidx.drawerlayout.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">
2019-06-11 19:38:26 +02:00
<androidx.coordinatorlayout.widget.CoordinatorLayout
2017-05-05 16:36:04 +02:00
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-05-18 11:10:30 +02:00
tools:context="app.fedilab.android.activities.MainActivity">
2017-05-05 16:36:04 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
2017-05-05 16:36:04 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-09 15:31:33 +01:00
>
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<androidx.appcompat.widget.Toolbar
2017-05-05 16:36:04 +02:00
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-10 19:20:44 +01:00
android:background="?colorPrimary"
2017-10-27 18:05:57 +02:00
app:layout_scrollFlags="scroll|enterAlways"
2019-11-07 18:57:05 +01:00
>
2019-09-06 17:55:14 +02:00
<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" />
2019-09-06 17:55:14 +02:00
<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">
2019-09-06 17:55:14 +02:00
2017-08-24 18:05:57 +02:00
<TextView
2017-09-23 14:51:59 +02:00
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" />
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.tabs.TabLayout
2017-10-27 18:05:57 +02:00
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"
2019-11-10 19:20:44 +01:00
android:background="?colorPrimary"
2019-11-08 18:36:52 +01:00
app:tabSelectedTextColor="?colorAccent"
2017-10-27 18:05:57 +02:00
app:tabMaxWidth="0dp"
2019-11-08 18:36:52 +01:00
android:layout_height="wrap_content" />
2019-09-06 17:55:14 +02:00
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"
2019-11-08 18:36:52 +01:00
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" />
2019-09-06 17:55:14 +02:00
2019-05-19 14:33:24 +02:00
<ImageView
android:layout_gravity="center_vertical"
android:visibility="gone"
android:id="@+id/display_timeline"
2019-11-08 18:36:52 +01:00
android:src="@drawable/ic_more_horiz_black"
2019-05-19 14:33:24 +02:00
android:contentDescription="@string/display_timeline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp" />
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<androidx.appcompat.widget.SearchView
2017-08-24 18:05:57 +02:00
android:id="@+id/toolbar_search"
android:gravity="end"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
2019-06-11 19:38:26 +02:00
</androidx.appcompat.widget.Toolbar>
2017-09-23 14:14:15 +02:00
2019-06-11 19:38:26 +02:00
</com.google.android.material.appbar.AppBarLayout>
2017-05-05 16:36:04 +02:00
<!-- Framelayout to display Fragments -->
2019-11-07 18:57:05 +01:00
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
2019-11-07 18:57:05 +01:00
tools:context="app.fedilab.android.activities.MainActivity"/>
2017-05-05 16:36:04 +02:00
<!-- Framelayout to display Fragments -->
2019-11-07 18:57:05 +01:00
<RelativeLayout
android:visibility="gone"
2017-05-05 16:36:04 +02:00
android:id="@+id/main_app_container"
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"
2019-11-07 18:57:05 +01:00
tools:context="app.fedilab.android.activities.MainActivity"/>
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.floatingactionbutton.FloatingActionButton
2017-10-27 18:05:57 +02:00
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"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_edit"
tools:ignore="VectorDrawableCompat" />
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.floatingactionbutton.FloatingActionButton
2017-10-30 07:54:02 +01:00
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"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_delete_floating"
2017-10-30 07:54:02 +01:00
tools:ignore="VectorDrawableCompat" />
2019-09-06 17:55:14 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.floatingactionbutton.FloatingActionButton
2017-11-23 18:16:47 +01:00
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"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_action_add_new"
2017-11-23 18:16:47 +01:00
tools:ignore="VectorDrawableCompat" />
2019-06-11 19:38:26 +02:00
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2017-05-05 16:36:04 +02:00
2019-06-11 19:38:26 +02:00
<com.google.android.material.navigation.NavigationView
2017-05-05 16:36:04 +02:00
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" />
2019-06-11 19:38:26 +02:00
</androidx.drawerlayout.widget.DrawerLayout>