Code example for NumberPicker

Methods: setVisibilitysetValue

0
                mAmPmButton.setVisibility(View.GONE);
            } 
        } else { 
            int index = mIsAm ? Calendar.AM : Calendar.PM;
            if (mAmPmSpinner != null) {
                mAmPmSpinner.setValue(index);
                mAmPmSpinner.setVisibility(View.VISIBLE);
            } else { 
                mAmPmButton.setText(mAmPmStrings[index]);
                mAmPmButton.setVisibility(View.VISIBLE);
            } 
        } 
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
    } 
 
    private void onTimeChanged() { 
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
        if (mOnTimeChangedListener != null) {
            mOnTimeChangedListener.onTimeChanged(this, getCurrentHour(), getCurrentMinute());
        } 
Stop searching for code, let great code find you!  Add Codota to your java IDE