@Override public void onDialogClosed(boolean positiveResult) { // hackfix: The Android number picker accepts input via soft keyboard (which makes sense // from a UX viewpoint) but is not designed for that. By default, it does not apply the // input there. See http://stackoverflow.com/questions/18944997/numberpicker-doesnt-work-with-keyboard // A workaround is to clear the focus before saving. picker.clearFocus(); if(positiveResult) { getNumberPickerPreference().setValue(picker.getValue()); } }
@Override public void clearFocus() { mIntegerPicker.clearFocus(); mNumeratorPicker.clearFocus(); mDenominatorPicker.clearFocus(); }
@Override public void onClick(DialogInterface dialogInterface, int i) { mPicker.clearFocus(); ((PdfViewer)getActivity()).positiveButtonRenderPage(mPicker.getValue()); } })
@Override public void onClick(DialogInterface dialog, int which) { mNumberPicker.clearFocus(); Intent intent = new Intent(); dismiss(); if (mRadioGroup.getCheckedRadioButtonId() == R.id.page) { intent.putExtra("page", mNumberPicker.getValue() - 1); } else { intent.putExtra("floor", mNumberPicker.getValue()); } getTargetFragment().onActivityResult(ActivityUtils.REQUEST_CODE_JUMP_PAGE, Activity.RESULT_OK, intent); } })
@Override public void onDialogClosed(boolean b) { if (b) { picker.clearFocus(); int value = picker.getValue(); if (getPreference().callChangeListener(value)) { getNumberPickerPreference().setValue(value); } } } }
if (positiveResult) { mPicker.clearFocus(); setValue(mPicker.getValue());
if (positiveResult) { mPicker.clearFocus(); setValue(mPicker.getValue());
if (positiveResult) { mPicker.clearFocus(); setValue(mPicker.getValue());
protected void onDialogClosed(boolean positiveResult) { if (positiveResult) { mPicker.clearFocus(); setValue(mPicker.getValue());
.setPositiveButton(getString(R.string.action_common_set), (dialog, id) -> { pickerR.clearFocus(); pickerG.clearFocus(); pickerB.clearFocus(); pickerA.clearFocus();