Brand new here - and I'm positive this has been answered before, but I'm just not searching right.
My question is simply: when do you use multiple layouts vs multiple activities? And why?
I'm working on a demo app. Essentially it has 4 parts:
1) Intro screen
2) Login screen
3) Listview of results from a database
4) Detailed view of what they clicked in the listview in #3
... and possibly the viewing of a PDF (which would be system level stuff - with their default app).
Currently, I have #3 above working the way I like. I tried wiring layouts to swap between each other - but they seem to end up putting each other atop of one another. That got me thinking about this question.
I want it to work like every other app. On the intro screen, you click START and the screen slides off to the left and the login screen slides in from the right. When you log in, a progress dialog shows up, then it shifts off and the listview slides into place, etc.
Based on what I know thus far, it seems that I could use a single activity with multiple layouts (provided I could get the old one to disappear of course). But to get it to behave like other apps, I would probably have to go with activities.
I'm an old school procedural programming guy. OOP is fairly new (and somewhat foreign to me - which is why this VB.net style developer tool is so great) - my main concern would be saving variable state between activities (I haven't even researched that yet).
Again, sorry - I'm sure this is very common and there is a ton of literature for me to read ... just point me in the right direction
Thanks!
My question is simply: when do you use multiple layouts vs multiple activities? And why?
I'm working on a demo app. Essentially it has 4 parts:
1) Intro screen
2) Login screen
3) Listview of results from a database
4) Detailed view of what they clicked in the listview in #3
... and possibly the viewing of a PDF (which would be system level stuff - with their default app).
Currently, I have #3 above working the way I like. I tried wiring layouts to swap between each other - but they seem to end up putting each other atop of one another. That got me thinking about this question.
I want it to work like every other app. On the intro screen, you click START and the screen slides off to the left and the login screen slides in from the right. When you log in, a progress dialog shows up, then it shifts off and the listview slides into place, etc.
Based on what I know thus far, it seems that I could use a single activity with multiple layouts (provided I could get the old one to disappear of course). But to get it to behave like other apps, I would probably have to go with activities.
I'm an old school procedural programming guy. OOP is fairly new (and somewhat foreign to me - which is why this VB.net style developer tool is so great) - my main concern would be saving variable state between activities (I haven't even researched that yet).
Again, sorry - I'm sure this is very common and there is a ton of literature for me to read ... just point me in the right direction
Thanks!