I am working on some animation in which there are four images. I want to do as follows:
Flip them from right to center
Then from center to left side
The right side should be smaller and when flipped, it should come to center and size of the image should be enlarged.
The next image should come to the center and the current image should go to left side and the size of the image should decrease by animation(or scaled).
Basically I want images to grow from right to center and then shrink to left side...same thing for left to right.
Can anybody please tell how to do this animation?
Thanks
Perhaps android-3d-flip-view-transition is what you are looking for? There is also the FlipAnimator class, it really depends on how you want to implement this but from what I can tell they both allow you to specify pivotal points so you can flip left-to-right like a book or centered like in iOS when you click the little "i" info button at the bottom-right hand corner of some apps.
Related
I want to implement a swipable round images in android, there will be once round image in the center and the same round images queued up behind the center image towards left and right sides.
The images in front overlap the images behind.
On swiping to right the image behind(towards the right) should come forward and the same vise versa as in case of left.
Can any one kindly help me figure out a solution for this.
Thanks,
Just have a look at this project, let me know if this is what you are trying
http://www.codeproject.com/KB/android/androcarousel.aspx
I'm trying to develop a game which has the track sliding down from the top to the bottom. When you start the track(which is a large image) is "out of screen" then it slides from the top and goes out at the bottom. The images might be very large, larger/taller than most screens.
I can animate the image with animations, but Android scales the image to the screen size on load, which I dont want. How can I keep the original size of the image?
I dont think using ScrollView would be good since I dont want the user to scroll the image.
This is what I would like to achieve:
As a quick fix you could try to wrap you ImageView with an AbsoluteLayout. Check an answer to the question How to create a view that is bigger than the screen?
Be aware it's deprecated and for the stable future use you have to get another solution.
I have a 4 sharp cornered image to display it my android application. But i want that image to be little curved from Top Left Corner. There should be no animation, nothing. Just an Image with a Curve on its top left corner.
Please look into the following image for reference, for what i wanted to achieved.
take a linear layout with fill parent and set background color while. then use image with in linear layout to show another one image on the screen.
I'm trying to create a 9-patch image that only stretches horizontally, and as you can see in the attached image, I drew only in the center top.
The second image in the preview (the middle one) shows what I think it's wrong. I just want to stretch the middle, so it makes no sense to me why it isn't displaying the right part of the image - the frill. The left part is OK, thought.
Any help is appreciated!
Edit: Added another image to show it with "show patches" and "show content" enabled:
The layout defines how much and in what direction an image gets stretched. A 9-patch can only define what parts of an image should be stretched and which parts not. You can basically exclude parts of the image from stretching. In your example the left and the right parts won't be horizontally stretched. They will, however, still be stretched vertically. Since you have selected nothing on the vertical side, the image gets stretched equally.
How does it look in-app? It may just be that the draw9patch tool is not previewing it correctly. Try stretching the window as wide as possible. Also checking the "show content" and "show patches" checkboxes might help to show you what the tool thinks is going on.
Also, be sure that the tray containing the stretch pixels is completely transparent, is exactly 1 pixel wide, and goes around the entire bitmap.
I am trying to create a stretchable scroll handle for my app.
The first image is the scrollhandle.9.png that I include in my app's resources.
The second image shows what this 9patch image looks like when used in my app.
Any advice on how to accomplish a stretchable scroll handle?
Edit: With help from posters, I was able to get an image that works. I added it below to help those who may find this in the future.
The area covered by the top and the left black line(dots) will be used while scaling your image. This area will be highlighted to you when you click the "show patch" option. You can see how the image scales by using the "Patch scale" option given in the draw9patch tool.
The area covered by the right and bottom lines(dots) will hold the content for the background.
Eg: You can define boundaries for the text inside 9 patch image for editor background. For your case you don't need right and bottom lines.
So for your case place two dots at the top corner and two dots at the left corner. Make sure patches doesn't fall in the arrow image of the scroll(if they do fall your arrow image will also get stretched) . Try putting the dots only in the left and top lines till you get the desired preview with "Patch scale" option.
If you use only one dot (instead of four) at the top and bottom left, and one at image top center, it should stretch the way you want it to.