Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Swap default content view with a new view dynamically

$
0
0

I have a section of index.xml that looks like this

<View id="content">
... stuff here ...
</View>
The stuff in there is default content for the view, Now I have a couple different Buttons on the page. How do I swap out the content onclick to the other view chosen by the user's button click? It's kind of like a hand-rolled tab group basically, but I am not using the default TabGroup for a few different reasons.

Should I draw both views and hide and show on click, or is there a way to render a view to a variable in index.js and swap it on the fly with the default hard coded content in the index.xml file?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>