mirror of
https://github.com/DrKLO/Telegram.git
synced 2025-01-03 17:52:22 +01:00
Update EditTextEffects.java
This commit is contained in:
parent
711f26cb11
commit
ffccac682e
1 changed files with 1 additions and 2 deletions
|
@ -146,8 +146,7 @@ public class EditTextEffects extends EditText {
|
|||
invalidateEffects();
|
||||
|
||||
Layout layout = getLayout();
|
||||
if (text instanceof Spannable && layout != null) {
|
||||
if (start > layout.getLineCount()) return;
|
||||
if (text instanceof Spannable && layout != null && start <= layout.getLineCount()) {
|
||||
int line = layout.getLineForOffset(start);
|
||||
int x = (int) layout.getPrimaryHorizontal(start);
|
||||
int y = (int) ((layout.getLineTop(line) + layout.getLineBottom(line)) / 2f);
|
||||
|
|
Loading…
Reference in a new issue