Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pinview/src/main/java/com/chaos/view/PinView.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextPaint;
import android.text.TextUtils;
Expand Down Expand Up @@ -336,7 +337,15 @@ protected void onSelectionChanged(int selStart, int selEnd) {
}

private void moveSelectionToEnd() {
setSelection(getText().length());

try {
Editable editable = getText();
if (editable != null && editable.length() > 0) {
setSelection(getText().length());
}
}catch (Exception e){
e.printStackTrace();
}
}

@Override
Expand Down