Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android, appcompat v21, implement scrolling techniques

In http://www.google.com/design/spec/patterns/scrolling-techniques.html described scrolling techniques. But I have not found details of how to implement it. I'm trying to implement "Flexible space with image" anyone have an example of this?

like image 857
user60108 Avatar asked Nov 20 '14 16:11

user60108


People also ask

How do I fix scroll position on top of layout?

Inside AppBarLaout , add child CollapsingToolbarLayout and TabLayout . Keep Toolbar and ImageView into CollapsingToolbarLayout . 4. Add attribute app:layout_scrollFlags="scroll|exitUntilCollapsed" to CollapsingToolbarLayout and attribute app:layout_scrollFlags="scroll|enterAlways" to Toolbar for collapsing effect.

What is NestedScrollView?

NestedScrollView is just like ScrollView , but it supports acting as both a nested scrolling parent and child on both new and old versions of Android. Nested scrolling is enabled by default.

What is fillViewport?

android:fillViewport. Defines whether the scrollview should stretch its content to fill the viewport.


1 Answers

I think this lib perfectly suits your need :

https://github.com/ksoichiro/Android-ObservableScrollView

It includes all the scrolling techniques described in the Google design specs and more. Moreover, it brings support for ListViews, GridViews, ScrollViews, RecyclerViews and WebViews.

like image 166
MathieuMaree Avatar answered Sep 27 '22 17:09

MathieuMaree