i'm trying to achive this on my application:
youtube link
The goal is to have a ViewPager that can be dragged vertically but at the same time you can swipe the views inside of ViewPager, the problem is when i swipe inside of viewPagger horizantally the dragg resets to the inicial position
to achive what is in the video, i follow this blog post
So i implemented a DraggerViewHolder that extends to a FrameLayout and then ViewDragHelper inside of it! all the code is at github
So, how can i make it stay on the same drag state?
So finally i have manage to fix the problem(sort of because sometimes i still get the "bug").
You can see in the github repo(in the question) the commit with the fix, for more information about the solution see this question
Related
I am trying to implement an application intro something like in the attached gif.
I know Shared animation isn't supported in Viewpager but I really need to have something like that.
Any help would be appreciated.
One way would be to draw the animating view in top of view pager using framelayout. And then animate it using scale animation and translate animation when view pager moves..
I am answering my own question just to help others who are looking for the same.
I have found the library for such kind of animation. Below mentioned is the github link
https://github.com/IFTTT/SparkleMotion
However, I used the suggestion given by PrafulBhatnagar and used some overlay views while hiding the actual page views during the viewPager's scrolled/fling state.
I'm trying to do some animation on my ViewPager. On my main View i have a ViewPager and two buttons. what I want to do is when I click on left button then view in viewPager is move to the left (off-screen) and next view fades in and the same way for right button but to right side. (something like Tinder app effect but simplest). I found a nice interface named ViewPager.PageTransformer but i can't figure out how to move view in way that I want.
Thanks for help :)
This repo has a handful of animations. If what you're looking for isn't present, at least you have a decent start.
https://github.com/ToxicBakery/ViewPagerTransforms
You may want to see this. It shows a sample having 2 buttons and pages scrolls on click of these.
http://developer.android.com/intl/es/training/animation/screen-slide.html
Iv seen other post's that attempt to answer this but don't quite cover it. So hopefully somebody could clear this up.
I have an activity that displays a card, the idea is when you swipe right/left/up the card will move in that direction following the users finger movement the way ViewPager works for scrolling left right. What is the simplest way to implement this kind of animation ? Are there an Open Source libs that do this already ?
I currently have a slide_in/slide_out animation that is used in when calling replace in fragment manager but this applies the animation after the swipe action and not during
(EDIT) I could use a scroller and scroll the view but I wanted something a little "cooler" like swiping through a deck of cards one card at a time.
Thanks in advance
I'm trying to use a SlidingPaneLayout inside of a ViewPager. All I can find are solutions for the other way around, like Using Android's SlidingPaneLayout with ViewPager which doesn't work.
Is there something easy to change to allow the SlidingPaneLayout's edge to get priority over a ViewPager's? I don't know anything about handling touch events or I'd try to tackle it myself.
JFeinstein slideMenu project is referred to in this post - very similar to yours. The config for the inner view can be configured to consume the swipe from the edge of the bezel, before that event propogates to the ViewPager
I'm trying to add some arrows to the screen to indicate if there are items available to the left or right so that the user knows to scroll.
Initially I just added these images into the instantiateItem function in the pageradapter. However I want to animate the arrows so that they fade in and out and disappear when the user touches the screen.
I've started to think that I may be best off extending the viewpager class so that it always displays the arrows independently of the adapter. I've looked through the code but can't see a place where I would add the overlay view.
Has anyone got any ideas?
Thanks,
m
As suggested by CommonsWare
You might wish to take a look at github.com/JakeWharton/Android-ViewPagerIndicator and see how Jake did it.
this information lead me to the solution.