java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Editor$SelectionModifierCursorController.show()'

前端 未结 2 1052
孤街浪徒
孤街浪徒 2020-12-18 13:36

I have an exception on Crashlytics that doesn\'t show any of my code on the stack trace, how can I figure out what is causing it? Seems to be happening exclusively on Androi

相关标签:
2条回答
  • 2020-12-18 14:06

    You can reproduce that by calling setText("test"); inside onFocusChange and long pressing that EditText on Samsung s8 (I am not sure about other devices).

    As a solution you may try to get rid of setting text or other manipulations which causes text rearrangement in onFocusChange or delaying it with handler.

    0 讨论(0)
  • 2020-12-18 14:16

    I have a AppCompatAutoCompleteTextView that changes size when it is on focus. Turns out users were long pressing on it while it was on the collapsed size and when the onFocusChange event fired the whole thing would change and it would crash.

    0 讨论(0)
提交回复
热议问题