List of usage examples for android.widget NumberPicker getNumber
public char getNumber()
From source file:com.sbgapps.scoreit.numberpicker.NumberPickerDialogFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final NumberPicker picker = (NumberPicker) inflater.inflate(R.layout.number_picker_dialog, null); ImageButton btn = picker.getSetButton(); btn.setOnClickListener(new View.OnClickListener() { @Override/* w w w . java 2 s . c o m*/ public void onClick(View view) { final Activity activity = getActivity(); final Fragment fragment = getTargetFragment(); if (activity instanceof NumberPickerDialogHandler) { final NumberPickerDialogHandler act = (NumberPickerDialogHandler) activity; act.onDialogNumberSet(mReference, picker.getNumber()); } else if (fragment instanceof NumberPickerDialogHandler) { final NumberPickerDialogHandler frag = (NumberPickerDialogHandler) fragment; frag.onDialogNumberSet(mReference, picker.getNumber()); } dismiss(); } }); return picker; }