I have an application using ListView inside Tabs, and i'd like to switch to a separate View(data collection widget) on clicking an item in the List. I'm adding each List's row's children to a ViewFlipper and the items are added at runtime so there is no definite number of views. As such, i would want to navigate/switch to a particular View in the ViewFlipper. Any pointers? Thanks in advance.
+1
A:
there is no definite number of views.
Very bad approach to add infinite views for a ViewFlipper. Try to add only one, and when an list item is selected refresh the only view and bring it up.
Pentium10
2010-07-19 14:16:31
A:
I have the same problem, I think we had to put in the viewflipper the current view, and the next view we want to display, and call the method shownext() (or showprevious()).
Anthony M.
2010-07-21 14:02:09
Thank you Muniu, it's works fine for the flip! But with your solution, the view flipper is no longer center is his parent even if I define it in the xml layout...Is someone have an idea?
Anthony M.
2010-07-22 09:42:49
A:
Thanks guys. I have worked around the ViewFlipper setDisplayedChild() method and it works perfectly in my scenario.
myViews.setDisplayedChild(pos);
pos being the ID of the View I want to switch to.
Muniu
2010-07-21 14:56:50