Java – clicking on an item results in an IllegalStateException

How did this happen? I used recyclerview in the clip, and the clip itself implements my click listener

Sometimes, clicking an item in the list causes the following errors:

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

How did this happen? Click the handler that should be forwarded to them synchronously. This shouldn't happen, should it?

resolvent:

Some code snippets will help. But your error has declared that this operation cannot be performed after onsaveinstancestate

This means that after calling the function onsaveinstancestate(), you try to perform some operations. By placing the code before onsaveinstancestate(), you may have a solution

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>