Code example for Spinner

Methods: getSelectedItemPosition

0
 
            return spinner;
        } 
 
        public String getValue() {
            return Integer.toString(spinner.getSelectedItemPosition());
        } 
    } 
 
    public static class LabelInput extends PromptInput { 
        public static final String INPUT_TYPE = "label";
        public LabelInput(JSONObject obj) {
            super(obj);
        } 
 
        public View getView(Context context) throws UnsupportedOperationException {
            // not really an input, but a way to add labels and such to the dialog 
            TextView view = new TextView(context);
            view.setText(Html.fromHtml(mLabel));
            mView = view;
            return mView;