1

I just started to learn android and wanted to know if this kind of views can be achieved in android

Here the user will be moved to step 2 and then to step 3.

Should i use 3 different xml pages for this or is a single xml enough? A reference to similar code or tutorial would be helpful

Thanks

Mr.Noob
  • 348
  • 1
  • 4
  • 12
  • 1
    By the way, questions asking us to **recommend or find a book, tool, software library, tutorial or other off-site resource** are off-topic for Stack Overflow – OneCricketeer Jul 22 '16 at 05:52
  • i dont need the complete code or full tutorial just a reference to similar layout would be helpful – Mr.Noob Jul 22 '16 at 05:55

1 Answers1

0

This is very possible, I would start with a activity and a base layout. Then I would have multiple layout files for the different screens. After that I would switch between the layouts by inflating them and replacing the content of the base layout with the new page the action goes to.

For the popup I would simply make my own dialog class implemented from the androids basic dialog class.

Here is a link to switching between layouts. Inflate a view / layout into another layout?

Here is a link to making your own dialog. https://www.mkyong.com/android/android-custom-dialog-example/

Community
  • 1
  • 1
JQluv
  • 244
  • 1
  • 6
  • Usually I like to stay away from android fragments and android versioin specific stuff because I like to support the oldest versions also I like to make sure my applications performance is as high as I can make it by using the basic tools of android and making my own highly optimal solutions. You can make a pretty neat staging system with a simple array or a class. It will also teach you how to program a app for android very effectively and efficiently. – JQluv Jul 22 '16 at 05:59
  • Thanks for the solution. Will try that out and see if i could achieve similar results. Thank you :) – Mr.Noob Jul 22 '16 at 06:06
  • Why not transition fragments instead of replacing inflating and replacing the base layout? – OneCricketeer Jul 22 '16 at 06:46
  • Fragment Transitions are for API Level 21+ like i said in my comment earlier its best to support all android levels also it depends on if he really needs that ability. Most the time people don't use transition animations. Like such example here https://medium.com/@bherbst/fragment-transitions-with-shared-elements-7c7d71d31cbb#.l1ih37uuk Also you can still do normal animation for the dialog popup and support earlier versions. Sometimes their is such things as API overkill – JQluv Jul 22 '16 at 18:14