Vertical gallery in android

冷暖自知 提交于 2019-12-01 10:26:44

问题


i am developing an app, for which I need a gallery to be set in vertical mode instead of horizontal mode. my question is, is there any possibilities for me to show a vertical gallery kind of widget? Any help is appreciated.


回答1:


Why dont you create a custom adapter for the listview? If you define a custom adapter with one imageview then it will be same as vertical Gallery view. So once you define this adapter then you will be having 1 imageview per one item so it will look like vertical gallery view.

FYI, here is a listview with image, you can use the same listview, play with it.




回答2:


you can use a ScrollView which contains some imageView setted to fill_parent , and then you can Scroll them as a vertical Gallery




回答3:


Ok. so i came to know that vertical gallery in android is not possible with the normal gallery widget. So I tried using Custom Listview with some modifications to change the look of the listview. Now my listview looks exactly like a vertical scrollable gallery.



来源:https://stackoverflow.com/questions/6056760/vertical-gallery-in-android

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