Best way to swipe images in Android

匆匆过客 提交于 2019-12-25 16:00:21

问题


So basically here is the thing that I want to know.

I'm working on application which will download images from internet and will save them in sdcard or db (doesn't matter).And after that I want to be able to show these images and swipe between them.

Example :

ListView.onItemClick show image with unique ID from 1-to 5.

At the beginning image shows as a content of xml file or in some other way,but I need to be able to show 4 buttons around the image.

Buttons on top : Back to listview activity and Info button (which) start another activity with some information about that image.

Buttons at bottom : Previous image , Next image (scrolling between the images)

While images are shown like this I want to be able to slide them with fingers too.So i have 2 different types of image slide : with buttons and with fingers.

After I click one of the images I want to make it on full screen and all buttons around it (Prev,Next,Back,Info) are gone.I want to see only the image on the screen,nothing else.And after I click it again the buttons shows up again.

So I made research over the internet and I'm not really sure how to do that thing.Which is the best way to get the things work.That's why I'm asking a question here.

So any suggestions,help or useful information are welcomed!

Thanks in advance!!


回答1:


You can use gestureoverlayview to handle touch and swipe detection.

http://developer.android.com/reference/android/gesture/GestureOverlayView.html



来源:https://stackoverflow.com/questions/7012363/best-way-to-swipe-images-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!