-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i add support to ViewPager? #23
Comments
Some other people have already requested this functionality so it's high on my todo list. I'll give it a try over the next few days, please stay tuned. |
Great lib, but really misses support for ViewPager. It would be cool to somehow listen to the "horizontal paging scroll" and set the alpha of the action bar according to the current vertical scrolling state of the next page. By the way I am using JakeWharton / Android-ViewPagerIndicator together with Fading Action Bar. |
Hi. I've been considering this and I can't think of a solution that does not involve major changes to the library, so I'm going to leave it aside for the time being. |
What a pitty... because the lib is awesome. I was expecting to use it with a viewpager too. |
You can use this with ViewPager! you just have to set a contentoverlaylayout for your viewpager and everything works fine! |
Really?? I'll give it a try as soon as I can. Thank you. |
I've tried and I cannot slide the viewpager setting it as header. |
What about initActionBar when the framgent becomes visible : @Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
mFadingHelper.initActionBar(getActivity());
}
} Simce to work for me... |
use headerOverlayLayout..... |
@FabianHippmann Could you maybe explain a bit better how to do this? I'm not able to get this to work with a viewpager. But my fragments in my viewpager only gets empty and I´m not able to swipe them to the side or swipe up to hide the imageview. This is what I want my layout to look like Thank you in advance! |
@ja1984 were you able to get this working? I'm in a similar position and want to be able to use a ViewPager in the content region (not the header, as some other posts have discussed). Thanks! |
@kyleparker unfortunately no i was talking to someone (much better coder than me) that sort of had something working. I will try to see if he got it working good :) |
@ja1984 and @kyleparker http://stackoverflow.com/questions/21445296/scrolling-effect-with-multiple-viewpagers |
@ja1984 @kyleparker Hi, I'm dealing with the same problem as you, were you able to figure anything out? |
I wasn't able to get it working so I changed my design layout... Just
|
Recently, I work in a project and it needs to use viewpager and FadingActionBar. I based on your fragment demo and they doesnt work quite well. So the idea is to use an FadingActionBarManager in the activity to keep states of all drawables and depends on which fragment is visible, it loads that drawable into actionbar.
And in your fragment
The manager
I dont have time to create a pull request because it requires me to fix compatibility issues related to other extras which I dont need to use. But this works in my case. Hope this dirty fix help you guys |
@cuongthai hello, I could spend the FadingActionBar Helper class with modifications? |
ViewPager in contentLayout is can't sliding
The text was updated successfully, but these errors were encountered: