If you think the Android project WizardPager listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.example.android.wizardpager.pages;
//www.java2s.comimport android.support.v4.app.Fragment;
import android.text.TextUtils;
import com.tech.freak.wizardpager.model.ModelCallbacks;
import com.tech.freak.wizardpager.model.Page;
import com.tech.freak.wizardpager.model.ReviewItem;
import java.util.ArrayList;
/**
* A page asking for a name and an email.
*/publicclass CustomerInfoPage extends Page {
publicstaticfinal String NAME_DATA_KEY = "name";
publicstaticfinal String EMAIL_DATA_KEY = "email";
public CustomerInfoPage(ModelCallbacks callbacks, String title) {
super(callbacks, title);
}
@Override
public Fragment createFragment() {
return CustomerInfoFragment.create(getKey());
}
@Override
publicvoid getReviewItems(ArrayList<ReviewItem> dest) {
dest.add(new ReviewItem("Your name", mData.getString(NAME_DATA_KEY), getKey(), -1));
dest.add(new ReviewItem("Your email", mData.getString(EMAIL_DATA_KEY), getKey(), -1));
}
@Override
publicboolean isCompleted() {
return !TextUtils.isEmpty(mData.getString(NAME_DATA_KEY));
}
}