suarezjulian / WizardPager

Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)
Apache License 2.0
514 stars 149 forks source link

Loading from Sqlite #8

Closed samsoft00 closed 9 years ago

samsoft00 commented 9 years ago

@TechFreak i've been working on this library for the past view days to create a student form. is there anyway i can load data from sqlite into the wizard and what the student select in the first page will determine what student see in the next page for MultipleFixedChoicePage and SingleFixedChoicePage??

suarezjulian commented 9 years ago

Hi samsoft00, I recommend you load up your data from Sqlite before you create your wizard model.

After that just fill the SingleFixedChoicePage or MultipleFixedChoicePage as you want. e.g.

            new SingleFixedChoicePage(this, "Bread").setChoices("White",
                    "Wheat", "Rye", "Pretzel", "Ciabatta")
                    .setRequired(true),

            new MultipleFixedChoicePage(this, "Meats").setChoices(
                    "Pepperoni", "Turkey", "Ham", "Pastrami", "Roast Beef",
                    "Bologna"),

Take a look at the example to know how to create your pages.

Loading data from sqlite is outside the scope of this library and there are a huge amount of examples on the web (e.g. http://stackoverflow.com/questions/22775532/android-retrieve-data-from-sqlite-database, or http://www.vogella.com/tutorials/AndroidSQLite/article.html), so I'm closing this