Commit bdef355
[TextInputEditText]Fix: TextInputEditText misses some visible lines in CursorAnchorInfo#getVisibleLineBounds after scrolled
TextInputEditText#getGlobalVisibleRect is overridden to call getGlobalVisibleRect on parent TextLayoutInput view directly. It doesn't match with the View#getGlobalVisibleRect implementation where the return globalOffset contains negative amount of the scroll in the view. As a result, calling getLocalVisibleRect will return a wrong rectangle when TextInputEiditText is scrolled.
PiperOrigin-RevId: 5423416781 parent 122c296 commit bdef355
File tree
1 file changed
+11
-3
lines changed- lib/java/com/google/android/material/textfield
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
0 commit comments