Back to project page SymptomManagement.
The source code is released under:
Apache License
If you think the Android project SymptomManagement listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android.capstone.patient.checkin_now.model; /*from w w w .j a v a 2 s.c o m*/ import android.support.v4.app.Fragment; import android.text.TextUtils; import java.util.ArrayList; import java.util.Arrays; import com.android.capstone.patient.checkin_now.ui.SingleChoiceFragment; public class SingleFixedChoicePage extends Page { protected ArrayList<String> mChoices = new ArrayList<String>(); public SingleFixedChoicePage(ModelCallbacks callbacks, String title) { super(callbacks, title); } @Override public Fragment createFragment() { return SingleChoiceFragment.create(getKey()); } @Override public void getReviewItems(ArrayList<ReviewItem> dest) { dest.add(new ReviewItem(getTitle(), mData.getString(SIMPLE_DATA_KEY), getKey())); } @Override public boolean isCompleted() { return !TextUtils.isEmpty(mData.getString(SIMPLE_DATA_KEY)); } public String getOptionAt(int position) { return mChoices.get(position); } public int getOptionCount() { return mChoices.size(); } public SingleFixedChoicePage setChoices(String... choices) { mChoices.addAll(Arrays.asList(choices)); return this; } public SingleFixedChoicePage setValue(String value) { mData.putString(SIMPLE_DATA_KEY, value); return this; } }