Toolbar smoothly disappears when scrolling down.

parent d10817e1
......@@ -5,7 +5,7 @@ android {
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.systemallica.gallery"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 27
versionCode 6
versionName "1.0.5"
......
......@@ -16,7 +16,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
app:popupTheme="@style/AppTheme.PopupOverlay"
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.design.widget.AppBarLayout>
......
......@@ -17,7 +17,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
app:popupTheme="@style/AppTheme.PopupOverlay"
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.design.widget.AppBarLayout>
......
......@@ -9,18 +9,26 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_main">
<GridView
android:id="@+id/gridViewFolder"
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:drawSelectorOnTop="true"
android:focusable="true"
android:gravity="center"
android:numColumns="2"
android:stretchMode="columnWidth"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
android:layout_height="match_parent"
android:fillViewport="true">
<GridView
android:id="@+id/gridViewFolder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:drawSelectorOnTop="true"
android:focusable="true"
android:gravity="center"
android:numColumns="2"
android:stretchMode="columnWidth"
android:nestedScrollingEnabled="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</android.support.v4.widget.NestedScrollView>
<TextView
android:id="@+id/placeholderNoImages"
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
<android.support.v4.widget.SwipeRefreshLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/swipelayout"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.systemallica.gallery.MainActivity"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_main">
android:id="@+id/swipelayout"
xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<GridView
android:id="@+id/gridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:gravity="center"
android:numColumns="2"
android:stretchMode="columnWidth"
android:nestedScrollingEnabled="true"/>
<GridView
android:id="@+id/gridView"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:gravity="center"
android:numColumns="2"
android:stretchMode="columnWidth"
android:focusable="true"
android:clickable="true"/>
</android.support.v4.widget.NestedScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file
......@@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......@@ -15,6 +16,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment