I am trying to use a static class to pass value to a view instead of using intent as I have to pass a large amount of data. Sometimes I get this error and couldn\'t find out wha
Sometimes this error occurs.
Here is my suggestion:
In your DataResult
->getData()
return a copy of the data.
DataResult
is a singleton and holds the data. When your view gets the data, the view gets the data reference witch the DataResult
is holding. Then setData()
would change the data
reference. Here comes the IllegalStateException.
Hope it would work :)