Alright so I know this has been asked before but the question and answer both didn't help me in my situation. What I need to do is simply get all of the data from the review page at the end of the wizard and put it into my SQLite database so that I may use it in the future within my application.
I'm not even sure which class I should be working on in this case. I really hope someone who's had trouble with this before can help me because I've been searching for days and I'm stumped!
Thanks in advance for any help you can give me!
here is my what I've tried so far however it is always returning null
mNextButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mPager.getCurrentItem() == mCurrentPageSequence.size()) {
String title = mWizardModel.findByKey("Surf:Post Title").getData().getString(SingleTextFieldPage.SIMPLE_DATA_KEY);
int price = mWizardModel.findByKey("Surf:Price").getData().getInt(NumberPage.SIMPLE_DATA_KEY);
String maincat = mWizardModel.findByKey("Main Category").getData().getString(Page.SIMPLE_DATA_KEY);
Long newId = myDb.insertRow(title, price, maincat);
DialogFragment dg = new DialogFragment() {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity())
.setMessage(R.string.submit_confirm_message)
.setPositiveButton(R.string.submit_confirm_button, null)
.setNegativeButton(android.R.string.cancel, null)
.create();
}
};
dg.show(getSupportFragmentManager(), "place_order_dialog");
} else {
if (mEditingAfterReview) {
mPager.setCurrentItem(mPagerAdapter.getCount() - 1);
} else {
mPager.setCurrentItem(mPager.getCurrentItem() + 1);
}
}
}
});