Android Question One or more Activitys?

Nilzzz

Member
Licensed User
Hello,

can someone please give me a short summary in which cases i should use one activity and when more activitys are usefull?

I have read the "Android Process and activities life cycle" thread but I do not understand quite the advantage in the use of multiple activitys. The search function has unfortunately also not helped me.

Thank you very much!
 

mangojack

Well-Known Member
Licensed User
There is no set rule/case to use 1 vs multiple activities. Probably the major factors would be size/complexity of your project/app.
As your project grows ,its generally considered better to have multiple activities as it is easier to handle and work with your code and layouts.
 

klaus

Expert
Licensed User

mangojack

Well-Known Member
Licensed User
Quoting Klaus from the above link Best Practice: multiple activities vs. multiple panels
I recommend using separate activities, thats the way Android was designed for. It's much easier to manage the code.
But it can depend on the kind of application you want to write.
yesterday I wrote a small personal app .. most basic,with minimal code. But it was more simpler to use multiple activities vs hiding /showing panels etc.
Only you will know the best approach as your app develops.
 
Top