Start a new activity or setContentView?
Is it better to start a new activity or just set a new content view in Android?
I usually start a new activity when I have to change the whole environment, but开发者_运维技巧 IMHO I think it's too onerous when I need to keep the other activity alive in the background.
On the other hand, I could have a single activity and just change the layout when I have to set a new environment.
Which is the better way and why?
Search for 'Pattern one activity, multiple views. Advantages and disadvantages' on stack-overflow and look for the answer by @CommonsWare
精彩评论