Android automatically scrolling background for large image - android

I would like to create a background which contains large (very wide) image which keeps on scrolling in an infinite loop.
So basically, each time, only a rectangle of the image (cropped) is shown and that rectangle keeps on scrolling smoothly on top of the image in turn showing a different part of the image.
How do I do that?

You can set the .gif image file in the background:
Is it possible to set an animated gif file as background of my app in android?
OR
You can implement Parallax by yourself

Related

using animation in imageview while changing image

I have used the code here to animate changing image of an ImageView. But it converts the first image to a white screen and then fade the white screen into the final image (no matter if I use background for ImageView or not).
the same effect is appeared when using slide_out_right and slide_in_left.
Question:
How can I directly go from current Image to a new Image using a custom Animation?
I know that it is possible when using ImageSwitcher but I wanne do it in an ImageView
TransitionDrawable is not the solution because it is applicable only for fade. I wanna use translate or any custom animation.
thanks for any help
Edit:
I think I got the answere, but I am not sure if it an efficient solution:
the white screen is because I am animating the whole ImageView. when it goes out the display what appeared is the Layout background which is white.
To solve the problem, I used two ImageViews and copy the current Image to one and the new image to the another one. animation_in is applied to the imageview containing new image and animation_out to the other one.

View pager android with single background picture

Is it possible to have one picture as a panorama background of a viewpager, without having to cut the image into 3 and put each of the 3 images as a background for each of the different views?
Like the home screen of android.
You want a horzontal Parallax .
this library should to the trick, or at least get you on track.

Seekbar lagging towards end Android

I have have a seekbar in inside a Liner Layout. This liner layout background image is set dynamically (Image coming from SDCARD). Thumb image is within the application. Progress drawable is transparent color.
There are image view around 6-7 all shows image from the SDCARD (images assigned in onCreate()). Depending upon the seek bar progress we showing particular image view. Seek bar max value is set dynamically (Depending upon imageview i.e.100 * no of imageview).
The problem is seek bar start lagging Just seekbar lagging (thumb movement) for last image view i.e. if max is 800 it lag from 700 to 800.
I am not able to figure out actual reason for lagging. Does any one faced same problem. What will be possible solution or fix to slider?
Thank You

set up different clickable part image android

Im working with android about image and onclick listener. The purpose of my app is to monitor the area that user clicks on the screen. For example, I have a picture containing a rectangular and a circle. Assume that the color of the whole picture is brown(wood). So when I click on the rectangular, the color of rectangle will change to yellow. When I click on the one part of the picture, the color of that part will change its color, but other parts do not change. So, Im thinking about the solution for this app. Do I have to cut this picture separately and put them into the screen by using relative review? Or is there any other way to do this(Set up a coordination system)?
Yes you have to cut this picture separately and put them into the screen by using relative review. For example two ImageView with your backgound.
You can slse the image as recommeded by the other post, or overlay the image with a RelitiveLayout with specific sized buttons (background = #android/color/transparent)

Image auto scrolling in android

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.

Categories

Resources