-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassCastException when device is rotated #382
Comments
The problem is in the logic to save and restore the instance state. What class are you setting as the type for the TokenCompleteTextView subclass? I'm guessing that the class type you're setting isn't playing nice with the default save and restore instance state code. Probably the solution will be for you to implement these yourself as described here: https://github.com/splitwise/TokenAutoComplete#restoring-the-view-state |
I have similar problem with latest version (v3.0.1). |
Edit: this diagnosis is incorrect, the issue was that the Ok, so the core of the problem is that calling I'm not able to reproduce this in the sample app, though this might be an app, keyboard or OS version issue. Can you give me those details? |
@mgod I solved why it happens. My class which extends TokenCompleteTextView was like this: I wasn't passing my model while extending TokenCompleteTextView, It was working with V2. Now I reaalized that code piece which throws error needs to know my model class. So while extending I am passing my model as well as your sample: And all problems gone away. Thanks for help. |
@nrazon Thanks for the follow-up. I'm going to close this for now, but I know this kind of issue doesn't pop up until you've had to save instance state, so I'll probably look into seeing if I can surface an error message/exception for this sooner or work around this specific case. |
This should be duplicated with #449 if you were enabling R8 fullMode. |
Hello.
I'm using latest 3.0.1 version.
When device is rotated, app crashes with logs:
Any idea how to fix this?
Thanks.
The text was updated successfully, but these errors were encountered: