I have large landscape image, I want to move that image smoothly across the screen without loosing aspect ratio. If you cant understand my question, please have a look at Android Newsstand app in that the cover image on top of the screen moves smoothly across the screen back and forth. how can i achieve that. please have a look at the image attached. The background image needs to move smoothly to the right when it reaches end it should move back to left.. Where should i start ?. Thanks in advance.
Update: Solution
PanningView is a library which implements the animated background in the now playing screen of the Play Music app.
Have a look at this library https://github.com/flavioarfaria/KenBurnsView
It is exactly what you are asking i hope :-)
Also do give a look at my this, which is modified ken burns view
https://github.com/HasanFaraaz/BackBurn
Related
I have an image which is equal the screen 3 times, how can I put it in a page? How can I maximize it and minimize it (No arrows, no gallery)
I think your trying to accomplish this. Next time, just do a quick Google Search for what your trying to do.
For pinching and zooming go here.
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 want to create an image auto scrolling for an outer-space type of game. To make it more exact, I want to load 2 background image that uses a single image occupying the whole screen and auto-scroll it alternatively to create an animation that the background image is moving. Don't get confused with auto scrolling and and shifting to another image automatically. I really meant auto scrolling like moving background using 1 image.
I did some research but what I saw are segments of java codes that made me confused. If possible can anyone provide me an example? From loading the image from xml (should I use an imageview with this? or just set the background image of the layout?) and how I should process it in java code to make an image autoscrolling.
Any ideas guys? Thanks! Sorry for asking too much.
At the moment, I am using Euro 2012 app and it has some interesting layout parts. If you go to matches->knockout screen, you'll see 3 screens like this.
If you slide left or right, you move between them not like between one activity to another, but just like all these elements are laid on one big canvas and you slide each screen into focus. Even thou, if you slide left/right, the screen cannot be stopped in the way that half of each image is visible, so I guess it's not a big canvas. Somehow you can slide screen like one big image, and yet it always lock perfectly as if they used 3 activities for this.
How did the do this?
It's a ViewPager, available in Android support package and described in their blog.
The designing is not so much difficult, As i think to draw that boxes showing quarterfinals, semifinals.
They having layout( we can do by placing image in background also).
The major role played by FrameLayout which shows you that effect(emphasis), the flages are fetch from url as matches are decided(not essentially images only names are sufficient as flags came inside app and gets applied as updated).
After your click i think the start image gets change it's just replacing that image with new one.
As you said they are not on single canvas (but if they did customization of heir Viewpager that it's not stopping in between activities), but i think it's on single canvas.
If your taking about quickness of loading and all it's up to you as much code and processing you optimized it gives you smooth feel and fast processing.
We can appreciate the work but we can not say it's too much difficult as i think it's quit easy...
Hope this explanation helps you to understand ....
I built a gallery. The centered image is scaled up. I did this by extending from gallery and overwriting getChildStaticTransformation. There I modified the camera. It zooms in when the image is close to the center point.
Problem: the centering item (from getSelectedItem()) changes a bit too late. sometimes the side elements that are smaller than the next coming get re-centered.
Is there any way to tell the gallery when it has tochanng to its neighbor?
Thank you so far.
I figured out this actually depends on the spacings set by setSpacing. If this paramter is 0 the gallery centers correctly as I want.
Problem: the Images spacing are to big then.
Is there a way to minimize the spacings without setSpacing in an artificial way?
Thanks