Create a different ViewStub for each case and then inflate the one you want
based on the button clicked.  ViewStubs don't take up any space until they
are inflated so this approach should give you the desired effect.

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Fri, Jul 30, 2010 at 3:29 PM, Victoria <victoriasarabu...@gmail.com>wrote:

> Hi there,
>
> I am trying to populate a ViewStub with a new view depending on which
> ImageButton is clicked, but as I just discovered ViewStubs I am not
> exactly
> sure how this would work...
>
> e.g. can I provide the ViewStub with different inflatedIds and within
> the
> onClick event of a Button inflate the ViewStub by calling a specific
> inflatedId???
>
> If someone could give me hand, that would be really great.
> Thank you very much in advance :o)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to