Skip to content

Commit

Permalink
Merge pull request #5 from ppoffice/master
Browse files Browse the repository at this point in the history
Fix null summary selection error for EditTextPreference
  • Loading branch information
XhinLiang committed Mar 23, 2016
2 parents fd43586 + fae66ac commit 69ad84c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onAction(com.rey.material.dialog.Dialog dialog) {
final Dialog dialog = mDialog = mBuilder.build(getContext());
EditText editText = (com.rey.material.widget.EditText) dialog.findViewById(R.id.custom_et);
editText.setText(getSummary());
editText.setSelection(getSummary().length());
editText.setSelection(getSummary() == null ? 0 : getSummary().length());
if (state != null) {
dialog.onRestoreInstanceState(state);
}
Expand Down

0 comments on commit 69ad84c

Please sign in to comment.