I want to draw an image on canvas constituted from smaller images, and make the new compound image scroll-able both horizontally and vertically as well as enable zoom-in, zoom-out and pan functionality. Any suggestions as to which View (container) I should use?
Related
I need to create a layout in Android like the image below:
The red rectange is the viewport. it should be possible to zoom in and pan until the borders of the image that contains the 4 imageviews.
I've tried putting the images in a gridview, that didn't really work
After that i tried putting them in a tablelayout, but the images have to keep aspect ratio.
so each row in the tablelayout had the correct width but the height was only half the rowview.
So when i pan it's possible to see the white edges from the rowview that was not filled completely
What would be the best way to achieve this layout?
I have an image that gets scaled from large to small as it spins. It's mean to be a fancy animation to simulate a tile being place on a board. The animation works as expected except for one thing: This image is cropped.
Each row of tiles is inside of a Horizontal LinearLayout. Each LinearLayout is inside of another LinearLayout (Vertical). This give the board. Sadly, the image animation is getting cropped to not excede the bounds of the parent layout. I don't want that. I want the image to be displayed and animated as if it's on top of everything else. I want it to exceed the layout.
Any idea how to fix this?
Here's a couple of screenshots:
Your image is constrained to fit within it's parent view as per design. You might want to use a canvas to hold all your tiles instead (keep in mind the bounds of the canvas for the corners otherwise you will have the same issue), or look into other layouts that might be able to accommodate your needs.
From: http://developer.android.com/guide/topics/graphics/view-animation.html
Note: Regardless of how your animation may move or resize, the bounds of the View that holds your animation will not automatically adjust to accommodate it. Even so, the animation will still be drawn beyond the bounds of its View and will not be clipped. However, clipping will occur if the animation exceeds the bounds of the parent View.
Currently, I have an XML file with lots of imageviews in it that can be scrolled through using navigation buttons. These imageviews can be rotated, scrolled and moved but when they are they will leave the bounds of the imageview and so you cant see parts or all of them.
Is there any way that I can resize the imageview programmatically at the same rate as the image is being scaled?
Alternatively, is there a way that i can draw the images to a canvas and each of them can be scaled individually?
can any one there help me to draw a rectangle on the Image View which is set as background of image whose size is bigger than emulator size(So it has horizontal and vertical scroll bar)..
I want to draw rectangle at right most corner of the image..so that drawn rectangle is shown only when the image is scrolled to that position..
Please suggest me with code also..
Thank You in advance..
take a large image and insert it in src. and make imageview inside scrollview.
I'm an android-newbie and I'm looking for a solution, how to overlap a horizontal-scrolling image-gallery with a vertical-scrolling image-gallery. that means one transparent image of the vertical-scrolling gallery should overlap one image of the horizontal-scrolling gallery (like a cross).
furthermore it should be possible to scroll either vertical or horizontal so that the image of the vertical-scrolling gallery or the image of the horizontal-scrolling gallery will change. is there an way ?
thanks a lot!
Just an idea, but what about a 3x3 table layout like so:
--VG--
HGIVHG
--VG--
where VG means vertical gallery, HG is horizontal gallery, IV is an image view and -- is just an empty frame layout.
Now, you have two image lists, the vertical and the horizontal list. You remember the image list states and always recognize the focused images in your data model. The two focused images are composed in the centered image view, whereas the remaining images are distributed in the adjacent galleries. It's a bit of effort but should work.