Code example for CheckBox

Methods: setText, setChecked, setLayoutParams

0
            super(obj);
            mChecked = obj.optBoolean("checked");
        } 
 
        public View getView(Context context) throws UnsupportedOperationException {
            CheckBox checkbox = new CheckBox(context);
            checkbox.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
            checkbox.setText(mLabel);
            checkbox.setChecked(mChecked);
            mView = (View)checkbox;
            return mView;
        } 
 
        public String getValue() {
            CheckBox checkbox = (CheckBox)mView;
            return checkbox.isChecked() ? "true" : "false";
        } 
    } 
 
    public static class DateTimeInput extends PromptInput { 
        public static final String[] INPUT_TYPES = new String[] {