Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android- How to make step by step wizard [closed]

Tags:

android

I want to make a registration form for my application . I want to ask a few question in each step. I want to have 3 steps and users should move to next step upon completion of previous step.

How can I do something like this in android in one activity?

like image 268
mahdi yamani Avatar asked Dec 31 '14 08:12

mahdi yamani


3 Answers

You can use a combination of Fragments and ViewPager to accomplish your task!

Recommended ViewPager Tutorials :

  1. http://android-er.blogspot.in/2014/04/example-of-viewpager-with-custom.html
  2. https://awesoham.wordpress.com/2013/10/05/tutorial-using-a-button-to-switch-pages-in-a-viewpager-android-studio/
  3. http://developer.android.com/training/animation/screen-slide.html

Hope this helps!

like image 192
gsanskar Avatar answered Nov 19 '22 07:11

gsanskar


You can use fragments. You can make each your step a fragment and when user answers your questions you can jump to next step.(fragment)

You can check fragments from here: http://developer.android.com/guide/components/fragments.html

If your steps are independent from each other you can put your fragments in a viewpager and make your steps slidable.

Here is a popular view pager library with indicator. (You can use indicators to notice current step) https://github.com/JakeWharton/Android-ViewPagerIndicator

Good luck.

like image 20
savepopulation Avatar answered Nov 19 '22 05:11

savepopulation


Check my below answer and Use this awesome solution using latest ConstaintLayout released. I have made checkout process in horizontal steps with progressbar.

https://stackoverflow.com/a/42694364/4862126

I have made this without using any library. enter image description here

like image 40
Er. Kaushik Kajavadara Avatar answered Nov 19 '22 06:11

Er. Kaushik Kajavadara