How to display other image when I scroll screen? - android

I have two images in drawable. I am using the ImageView to display them. However, I want to display each image individually by hand. At the first, I want to display image1.png. When I scroll left to right, it will be display images image2.png. Could you suggest to me the way to do it? Thank you so much

you can use ViewPager see this example http://developer.android.com/training/animation/screen-slide.html

Related

How to create Imageview stack

I want to display image view like below where one image will be below other. I'm using Picasso to set image. But it is setting image in entire space whereas I want to set only on the top layer. How to achieve this.
Any help would be appreciated.
Use StackView.
https://developer.android.com/reference/android/widget/StackView.html
I've only used a widget application, but I probably think to be able to use it on other scene.

How can I create a Horizontal Image Gallery

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?

Android Custom gallery

I have a image with the size of 1299 * 625. I want to show the image in Gallery view like first half is one page and second of is another page. Sorry for my Bad English..
Use the ViewPager and add two ImageViews to it. Split you image in half and assign each half to one ImageView.

how to keep an image on top of other image

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.

What is the best view for a displaying an images in android?

I'm designing an app that splits an image into a 3 x 3 grid. What is the best way to display this image.
Also, How can I move this piece from one point to another on the view.
Thanks.
Use an ImageView? I don't understand your second question. If you are talking about trying to show the 3x3 grid, use a GridView.
You can mess around with the ScaleType and image matrix to change what part of an image is displayed.

Categories

Resources