hide toolbar instead of tablayout

This commit is contained in:
Felix 2017-11-20 00:46:43 +01:00
parent e3141ddd0c
commit 6f67f3f153
4 changed files with 53 additions and 58 deletions

View file

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@ -15,8 +15,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
layout="@layout/toolbar"/>
<include layout="@layout/toolbar"/>
</android.support.design.widget.AppBarLayout>
@ -26,7 +25,7 @@
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"

View file

@ -6,9 +6,6 @@
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="4dp"
app:layout_anchor="@id/sliding_tabs"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/item_conference_cardview"
app:layout_anchorGravity="bottom"
android:layout_marginBottom="?attr/actionBarSize"/>
tools:listitem="@layout/item_conference_cardview"/>

View file

@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
<android.support.v4.widget.NestedScrollView
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:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -20,4 +24,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v4.widget.NestedScrollView>

View file

@ -1,42 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<FrameLayout
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="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways|snap">
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/primary"
android:elevation="4dp"
app:layout_anchor="@id/toolbar"
app:tabIndicatorColor="@color/white"
app:tabMode="scrollable"
app:tabSelectedTextColor="@color/white"
app:tabTextColor="@color/inactive_tab_color"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_anchor="@id/app_bar_layout"
app:layout_anchor="@id/sliding_tabs"
app:layout_anchorGravity="bottom"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</LinearLayout>
<include layout="@layout/loading_overlay"/>
</android.support.design.widget.CoordinatorLayout>
</FrameLayout>