can anyone let me know how to keep an image on top of other image. If we select a portion of the top image it should display the below image portion.
Please share the samp
Thanks in advance.
-pavan
I'm not sure if this would completely answer your question... but firstly, images shouldn't really ever overlap in a LinearLayout. If you're using a RelativeLayout, they definitely can overlap, and the image on top will be whatever was loaded last in the XML.
If I understand what you're attempting to do - kind of transparency (so to speak) of the top image so that portions of the bottom image are displayed along with portions of the top image ... I do things like that all the time by overriding the onDraw() method on my View to handle the image painting myself. There's allot of examples on the net for this - simple stuff.
Related
The screen should show the current image in the center and the next and previous images to its left and right in a smaller image size. You can see the image here On swipe, the images should change and select as new item. It would be helpful if someone could point me to existing code similar to this. I have tried Fancycoverflow. it gives this kind of effect, but it skips items when I try to set particular item in center. I am not able to scroll and set the image in center easily.
Here you can see something similar but not exactly. You can add round transformation, and bigger size that icon, which was clicked.
I tried to create a library for similar to your issue. You can custimize it for better suit. Here you can find the source code and a video that shows how it looks like.
See you.
I am trying to create a horizontal like image gallery on one of my activities. I want it to take up about 1/4 of the screen and when you swipe left or right it'll go to the next image. Also over the bottom portion of the image there is an indicator showing you where you are in the list of images. Similar to what was done in these apps:
I can't seem to find out how to create this in android. I'm hoping someone out there has an idea and can point me in the right direction or to a tutorial.
Have you taken a look at ViewPagerIndicator?
I need to build a component to view large images.
I cannot put the ImageView in a ScrollView because I will need to be handle other touch events on the image.
The ideal would be to build a "viewer"
with an horizontal handle
and a vertical handle
that enable to move where the picture is centered so that I can scroll the image using the handles without touching the picture itself.
I would like to achieve something like in the following picture, I have researched but I was not able to find any Android API or other component/library that I could use.
Thank you very much for any suggestion.
Best thing I can think of is use two custom scrollbars for the horizontal and vertical scroll. In an onChange() function you can change the crop area on the master image and display the cropped image. Depedning on how it is done you can get a slide effect going for the image.
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.
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