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

169 lines
7.4 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"
2019-11-15 16:32:25 +01:00
android:layout_height="wrap_content">
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"
2019-11-20 16:25:44 +01:00
app:layout_scrollFlags="scroll|enterAlways"
>
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
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
2019-11-15 16:32:25 +01:00
android:id="@+id/toolbar_title"
2017-08-24 18:05:57 +02:00
android:layout_width="0dp"
android:layout_height="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_weight="1"
2017-08-24 18:05:57 +02:00
android:textSize="16sp"
2019-11-15 16:32:25 +01:00
android:visibility="gone" />
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"
android:layout_width="0dp"
2019-11-15 16:32:25 +01:00
android:layout_height="wrap_content"
2017-10-27 18:05:57 +02:00
android:layout_weight="1"
2019-11-10 19:20:44 +01:00
android:background="?colorPrimary"
2019-11-15 16:32:25 +01:00
app:tabGravity="fill"
2017-10-27 18:05:57 +02:00
app:tabMaxWidth="0dp"
2019-11-15 16:32:25 +01:00
app:tabMode="scrollable"
app:tabSelectedTextColor="?colorAccent" />
2019-09-06 17:55:14 +02:00
2018-10-17 18:20:03 +02:00
<ImageView
android:id="@+id/delete_instance"
android:layout_width="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:contentDescription="@string/delete_instance"
android:src="@drawable/ic_delete"
android:visibility="gone" />
2019-09-06 17:55:14 +02:00
2019-05-19 14:33:24 +02:00
<ImageView
android:id="@+id/display_timeline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:contentDescription="@string/display_timeline"
android:src="@drawable/ic_more_horiz_black"
android:visibility="gone" />
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:layout_width="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="end" />
</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-15 16:32:25 +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
2017-05-05 16:36:04 +02:00
android:id="@+id/main_app_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-11-15 16:32:25 +01:00
android:visibility="gone"
2017-10-30 18:09:44 +01:00
app:layout_behavior="@string/appbar_scrolling_view_behavior"
2019-11-15 16:32:25 +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"
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-15 16:32:25 +01:00
android:contentDescription="@string/toot_it"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_edit"
2020-03-07 14:53:54 +01:00
/>
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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
2019-11-15 16:32:25 +01:00
android:contentDescription="@string/delete_all"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_delete_floating"
2019-11-15 16:32:25 +01:00
android:visibility="gone"
2020-03-07 14:53:54 +01:00
/>
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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin_floating"
2019-11-15 16:32:25 +01:00
android:contentDescription="@string/add_new"
2019-11-09 17:36:17 +01:00
android:src="@drawable/ic_action_add_new"
2019-11-15 16:32:25 +01:00
android:visibility="gone"
2020-03-07 14:53:54 +01:00
/>
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"
2019-11-20 14:14:47 +01:00
app:itemTextColor="?attr/textColor"
2019-12-17 18:04:59 +01:00
android:background="@color/cyanea_primary_dark_reference"
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>