I am trying to make an Accordian control where each section would have its own view accompanied with its own activity. With the TabHost I can add tabs based on Intents and it is this behavior I am trying to understand how to use. So given an intent or an activity how can i get the view?
+1
A:
When building things like that, you maybe want to use the ActivityGroup
class, which allows you to manipulate a group of activities. There, you can do things like:
// this will give you the view
View view = getLocalActivityManager()
.startActivity("NewsActiviy", intentRoot)
.getDecorView();
If you are working directly from an Activity
, and want to get its view, you will do something like this:
// this will give you the view
View view = getWindow().getDecorView();
Cristian
2010-08-15 18:18:15