ImageView Causes Crash But Only When Resuming From Standby Mode
I got an Activity class that uses two other classes; one of them extending ImageView and one that extends BaseAdapter like so: My ImageView class does some progresses when it is c
Solution 1:
Try adding
android:configChanges="keyboardHidden|orientation|screenLayout"
to your manifest file. The crash is a result of activity restart when the lock screen comes up. The lock screen forces portrait orientation and if you are not ready to handle it then your app may crash.
If that doesn't do it, try overriding onRetainNonConfigurationInstance().
See this post for info on how to retain objects: How to save lot of object in onRetainNonConfigurationInstance() in android
Also read this android-group thread for understanding what happens when device goes to sleep.
Post a Comment for "ImageView Causes Crash But Only When Resuming From Standby Mode"