Challenge:
Hi everybody. I need to make a vertical viewPager with a flip effect on pages change.
I'm developing with v19. I've tried several implementations but almost none has worked for me. Only with android-directionalviewpager-1.2.1fixed.jar achieve vertical viewpager it work, but when setting my pageTransformer gave an error. The others did not show the content. I have spent a lot of time implementing a solution but I have not succeeded.
Anyone can help me on how to accomplish my task?.
Excuse my English.
Thanks in advance.
You could simply copy the source code of ViewPager. Wherever you see it doing something horizontally, change it to do that same thing vertically. Look for things with the letter X or Y, e.g. getScrollX() or getScrollY(). It will probably take some time and you'll miss a few the first pass, but it's certainly possible (I've done it for one project).
Here's the source: https://android.googlesource.com/platform/frameworks/support/+/master/v4/java/android/support/v4/view/ViewPager.java
Related
Ok, so...
I know, there's been a real amount of questions about it, but it either didn't work, or was really fixed in a hard way. Oh, and that's my second day trying to do it, so please, accept my apologies about that and help me for Chet Haase's sake.
I have a button on top of a fragment, and a RecyclerView below it. When i press the button i want it to disappear and a new RelativeLayout with textfields to slide from the top.
I don't want to make it with animateLayoutChanges="true", cause it's not exactly what i was meant to do, and i want rather learn, than do it.
I tried to do it with widget.animate().translation... and the result was that one widget was just thrown in it's place when the rest of layout stood still. That's not what i meant to do.
I tried also to make an "new TranslateAnimation" since it has this "setFillAfter/Before" attribute... but that did not help me neither.
What i tried as well was to update the layout somehow adding to id margins and stuff (don't remember anymore, and i'm in work right now trying to figure it out, sorry) as it was described in some questions.
But none of that worked. I don't include code right now, cause i already tried to do it in some dozens of different ways.
Could you please tell me how to move a widget and make the rest of them to move with it? Is it possible?
I've already got it going once using setVisibility,animateLayoutChanges and animation combination, but that was massive and dirty as a baby duck.
Edit: oh, i almost forgot about it. Another problem is that when i animate/move a widget, only the rendering spod changes, but the real spot of it stays the same (ex. a onclicklistener)
Ok, me again.
I did it this way, that - let's say - i want to slide a button up and remove it.
So i animate it and all the other widgets (right, i can make a ViewGroup) up, put a listener on animation, and on "onAnimationEnd" i clear all the animations and set the visibility to GONE.
The animateLayoutChanges must be set to false
Still it's not what i wanted, so i'd be indebted to anyone who shows me another, better way.
I am writing an application where I need to scroll in both (left and right direction) infinitely.
I checked with following link and it work great but only in right side.
Is there any way to achieve left side scrolling as well.
Any suggestion here?
You can have a look at this project, I used it and it worked quite good, but in my case I had to do some other work to make things working in a correct way.
I am working on a photo collage app in which i have used custom view for rotating the image and zooming. But I am stuck at one thing. I have implemented below type of layouts successfully.
But I am not getting an idea for making below type of collage.
please help me ASAP.
One thing I could think of, if I were you, I'd look first at some rotation animations, at 45°, may be you should start from that, because that's not an easy layout, sorry if I'm mistaking
I would like to develop an application, which has a part, when I have to print a long text on the screen. My question is: What layout or view or ? are you recommend for Me, if I want to make paging effect? Some text could reserve more pages, and I would like to scroll between these pages with an effect like e-book readers does it. What shall I prefer? Webview? TextView with modifications? Canvas? Or What?
Please give me tips. (I just need some direction to where shall I start now)
Thanks in advance!
I think you're refering to the ViewPager :
http://developer.android.com/training/animation/screen-slide.html
If so, I recommend you to follow this training and come back on StackOverFlow if you have a problem, with some code, or something you've tried and hasn't worked.
While going through a IOS app in my company, I saw the buttons set in a horizontal scroll view in a animated manner which looked really good. When asked the IOS developers they said it is a pre built in function available in xcode. I want to know whether it can be achieved in Android.
Details regarding the scroll view.
There are buttons when scrolled over revolves around. To be more precise it moves in the anti-clockwise direction but doesn't disappear from view.
Thanks in advance for the help.
May be this is what you want or it may help you
http://www.codeproject.com/KB/android/androcarousel.aspx
If my understanding is correct about your question, We have HorizontalScrollView to achieve that in android. You have to do your own animation while scroll. There is no in build animations while scrolling.
Please go through the following link.