hey guys Im trying to figure out on how to hide the app bar when scrolling down and reveal it when scrolling up. unfortunately no luck with my xml file. Ive seen some tutorial and used it but still no luck. I saw some tutorial that its achievable even only with xml, heres my xml hoping someone could help m figure out why it's not scrolling.
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.serverus.oom.ServiceActivity"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<include android:id="@+id/app_bar" layout="@layout/app_bar" app:layout_scrollFlags="scroll|enterAlways" />/>
</android.support.design.widget.AppBarLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/service_content"
>
</LinearLayout>
</ScrollView>
</android.support.design.widget.CoordinatorLayout >
and heres my gradle dependencies.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}