android - How can I implement header view + sliding pager tab strip + view pager like Fancy app? -



android - How can I implement header view + sliding pager tab strip + view pager like Fancy app? -

i'm curious how fancy(https://play.google.com/store/apps/details?id=com.thefancy.app) implements kind of view. images @ below captured on seller page of fancy app.

at first, has header view + sliding tab strip + view pager contains fragments. if user scrolling downwards view, header view disappeared smoothly, , user can see pager title , view pager.

i'm trying implement similar feature using pagerslidingtabstrip(https://github.com/astuetz/pagerslidingtabstrip) , viewpager fragmentstatepageradapter contains few fragments using staggeredgridview etsy. (https://github.com/etsy/androidstaggeredgrid)

to implement feature, assume have utilize onscrolllistener of staggeredgridview, there's few problem.

the first 1 how delivery scrolling event main activity. process of transmission of scrolling event is: staggeredgridview -> fragmentstatepageradapter -> mainactivity. long way create has smooth scrolling. also, cannot sure parameters scroll event sufficient implement this.

public void onscroll(final abslistview view, final int firstvisibleitem, final int visibleitemcount, final int totalitemcount) {

(onscroll have value of index of first visible item, number of visible item, , total count of item.)

there other way handle event between many fragments , activities using event bus library otto square (https://github.com/square/otto), don't think it's idea.

i found blog post helpful implement pretty action bar + listview (http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/) still have no thought how implement view fancy.

probably, need create custom view pager detects scrolling event easily? or, there beautiful open source or helpful tips? little hint can helpful.

thanks in advance.

android android-viewpager android-view

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -