Hide actionbar on scroll (#135)
This commit is contained in:

committed by
Mikołaj Pich

parent
8d014ab7e9
commit
81d177c270
@ -1,37 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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/main_activity_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1"
|
||||
tools:context="io.github.wulkanowy.ui.main.MainActivity"
|
||||
>
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
android:baselineAligned="false"
|
||||
android:weightSum="1">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior"
|
||||
>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/main_activity_appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/main_activity_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_activity_progress_bar"
|
||||
@ -49,7 +40,8 @@
|
||||
android:id="@+id/main_activity_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/bottom_navigation_height" />
|
||||
android:layout_marginBottom="@dimen/bottom_navigation_height"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<com.aurelhubert.ahbottomnavigation.AHBottomNavigation
|
||||
android:id="@+id/main_activity_nav"
|
||||
@ -58,5 +50,4 @@
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -11,13 +11,13 @@
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="grades_summary"
|
||||
android:title="@string/pref_grades_summary_line_show"
|
||||
android:summary="@string/required_restart" />
|
||||
android:summary="@string/required_restart"
|
||||
android:title="@string/pref_grades_summary_line_show" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="attendance_present"
|
||||
android:title="@string/pref_attendance_present_show"
|
||||
android:summary="@string/required_restart" />
|
||||
android:summary="@string/required_restart"
|
||||
android:title="@string/pref_attendance_present_show" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_services_header">
|
||||
<SwitchPreference
|
||||
@ -34,9 +34,9 @@
|
||||
android:title="@string/pref_services_interval" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="services_enable"
|
||||
android:key="services_disable_mobile"
|
||||
android:title="@string/pref_services_mobile_data"
|
||||
android:dependency="services_enable" />
|
||||
android:title="@string/pref_services_mobile_data" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_notify_header">
|
||||
<SwitchPreference
|
||||
@ -45,27 +45,16 @@
|
||||
android:key="notify_enable"
|
||||
android:title="@string/pref_notify_switch" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_about_header">
|
||||
<PreferenceScreen
|
||||
android:key="pref_about"
|
||||
android:title="@string/pref_about"
|
||||
android:persistent="false">
|
||||
<PreferenceCategory android:title="@string/pref_about">
|
||||
<Preference
|
||||
android:selectable="false"
|
||||
android:summary="@string/pref_about_summary"/>
|
||||
<Preference
|
||||
android:key="about_version"
|
||||
android:title="@string/pref_about_version"/>
|
||||
<Preference
|
||||
android:key="about_osl"
|
||||
android:title="@string/pref_about_osl"
|
||||
android:summary="@string/pref_about_osl_summary"/>
|
||||
<Preference
|
||||
android:key="about_repo"
|
||||
android:title="@string/pref_about_support">
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
<PreferenceCategory android:title="@string/pref_about">
|
||||
<Preference
|
||||
android:key="about_version"
|
||||
android:title="@string/pref_about_version" />
|
||||
<Preference
|
||||
android:key="about_osl"
|
||||
android:summary="@string/pref_about_osl_summary"
|
||||
android:title="@string/pref_about_osl" />
|
||||
<Preference
|
||||
android:key="about_repo"
|
||||
android:title="@string/pref_about_support" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user