开发者

Use gallery instead of ViewSwitcher

I currently use a ViewSwitcher in my app but now I'm facing a problem because I need more than 2 views to switch between. 开发者_JAVA技巧 As ViewSwitcher does not accept more than 2 children, I've read that it's possible to use the Gallery widget to do so.

Each view in the ViewSwitcher is different (one is a LinearLayout with a ListView and a Button inside and the other one is a LinearLayout with an ImageView and a TextView inside).

Will I be able to use the Gallery widget given my requirements?

Can anyone point me to the right direction? Some tutorial/example or so..?

Thank you.


Use ViewFlipper which allows you more than 2 views and it's almost identical to ViewSwitcher (since both have the same super class). I don't recommend using GalleryView in this case since all your views will be different, thus your Gallery's adapter will look like a pile of crap.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜