开发者

replace child at particular index of viewflipper android

In开发者_StackOverflow my android application i am using view flipper for implementing pagination.

I am normally adding listviews as child for view flipper.If the user click on change view button this listviews should be deleted and replaced with gallery view.

Please let me know as how can i delete child at particular index and then add another layout at same index of view flipper.

Please forward your valuable suggestions


removeViewAt(int index) takes the index of the view you want to remove.

mHrPowerCadenceFlipper.addView(child, index) looks like it adds at an index.

It's not clear if the add replaces the current view at the index or inserts a new one.
Try it and see.


1/ why not open a new activity for your gallery view?

2/ why do you need pagination? a listview can easily accomodate several zillions of elements.

3/ did you check out the viewflipper documentation? doesn't removeViewAt does what you want?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜