1

I am new to Android App Development. I am trying to prepare User Profile with lots of questions. So, I was wondering what would be the best method for this. Should a new Activity be created for each of the Question or only one activity be used and only the question be changed everytime the user presses the "Next" button ? (Not sure how the latter is possible)

Any suggestions ?

Thanks, Naveen

Naveen
  • 677
  • 1
  • 11
  • 27

1 Answers1

0

You generally don't want like you said "a lot of" activites as that would make your manifest file big, making your app having more time to parse it, but that's not as big issue as it makes for you. Imagine the mess that would craete for you! Also there is a problem with back stack where activites are kept in your stack if you don't finish them or handle the stack properly. ViewPager and fragments seems to be an ideal solution and your friend. Also as I think in your case abstraction could make your life easier.

Bojan Kseneman
  • 15,488
  • 2
  • 54
  • 59
  • Thanks for your comment. But can you please elaborate a little bit more ? Questions are not too long. But instead of scrollable, I wish to move to the next question on a click of a button. – Naveen Apr 18 '15 at 14:59
  • I have elaborated a bit more – Bojan Kseneman Apr 18 '15 at 15:13
  • Thanks Bojan, This was helpful. Useful Links: 1) http://developer.android.com/training/animation/screen-slide.html 2) http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts – Naveen Apr 19 '15 at 10:19