开发者

Horizontol Scrolling View in Android

开发者 https://www.devze.com 2023-04-13 08:23 出处:网络
I want to create a Horizontol 开发者_Go百科Scrolling View in Android. The view would be a combination of images and text scrolling horizontally and I should be able to dynamically modify the content(t

I want to create a Horizontol 开发者_Go百科Scrolling View in Android. The view would be a combination of images and text scrolling horizontally and I should be able to dynamically modify the content(text and images) in the Scroller

Any ideas?


add HorizontalScroolView in the scrollview it will scroll in both directions.

ScrollView
  HorizontalScrollView
     ImageView


You could perhaps also have a look at the Gallery element.


You'd like something like ListView, but in horizontal orientation.

I'd make this to extend AbsListView, which is made to display dynamic lists.

Ideally if you'd copy ListView source and switch it to horizontal mode, but this is very complicated and long class, so look for easier options.

Try using GridView with just one row, stored in a HorizontalScrollView. Feed it with a ListAdapter, provide Views for your cells and setup content to display.

I didn't try this, but it seems like easy solution. Assuming that number of items will not be large, because there won't be optimizations available in ListView class.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号