Design lib - CoordinatorLayout/CollapsingToolbarLayout with GridView/listView
With ListView/GridView, it works only on Lollipop by following code-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
listView.setNestedScrollingEnabled(true);
}
I think for Now CoordinatorLayout works only with RecyclerView
and NestedScrollView
EDIT :
use -
ViewCompat.setNestedScrollingEnabled(listView/gridview,true); (add Android Support v4 Library 23.1 or +)
CoordinatorLayout not working
I believe you need to make your ListView
implement both ScrollingView
and NestedScrollingChild
interfaces.
It's not the easiest thing, but you should be able to do it if you look at RecyclerView
's source code. It makes use of a NestedScrollingChildHelper
and you should be able to do the same.
Gridview not showing/hiding toolbar
Currently the ListView
and the GridView
have the expected behavior with the CoordinatorLayout
only with API>21.
To obtain this behavior you have to set:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
gridView.setNestedScrollingEnabled(true);
}
You can find more info here.
Can't scroll completely down in ViewPager with NestedScrollView in CollapsedToolBarLayout
Answer for your EDIT: Try using setNestedScrollingEnabled(false) on your GridView
Related Topics
How to Check If Class Exists Somewhere in Package
Android Runtime Permissions- How to Implement
Listview Viewholder Checkbox State
Why Can't I Use Resources.Getsystem() Without a Runtime Error
Double Tap: Zoom on Android Mapview
How to Get Selected Xls File Path from Uri for Sdk 17 or Below for Android
Firebase Database Points to Wrong Database Url
Nullpointerexception on Button.Findviewbyid()
Rotate Marker and Move Animation on Map Like Uber Android
What Is the Equivalent to a JavaScript Setinterval/Settimeout in Android/Java
Open Source Face Recognition for Android
Adding Header to All Request with Retrofit 2
What's the Best Practice to Round a Float to 2 Decimals
Android Drawable Speech Bubble
Android 3.1 Usb-Host - Broadcastreceiver Does Not Receive Usb_Device_Attached