+ int selectionStart = getArguments().getInt(ARG_SELECTION_START, -1);
+ int selectionEnd = getArguments().getInt(ARG_SELECTION_END, -1);
+ if (selectionStart >= 0 && selectionEnd >= 0) {
+ inputText.setSelection(Math.min(selectionStart, selectionEnd), Math.max(selectionStart, selectionEnd));
+ }