Some users reported that my app screen sometimes flickers when running on Android 4.2 (only!)
I tried on my device, and after putting logs, the activity is restarted and restarted again, about 3 times a second.
So what I did is to trace the method calls when it restarts continually, and here is the result:
It seems that the problem lies in the ViewGroup.resetRtlProperties(), since this is new in Android 4.2 (17).
I can't confirm yet if this is a bug, but is there anyone else experiencing this or have any workarounds?
It's possible that the display problem you're facing might have spawned from a messy software build. Usually, a simple software update fixes the issue, so check if there's an update available for your device. To check your software version on Android, go to Settings > System > System update.
If all monitors, or your only monitor, flickers, it is worth checking out the hardware and connections. Check that your graphics card does not have accumulated dirt and dust on the surfaces. Make sure the cooling fan is working and that all case fans are turning when they should.
I had a similar problem and it was caused by a combination of the following two:
Instead of changing newConfig you can clone that object and change/use the clone:
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Configuration configClone = new Configuration(newConfig);
// Change/use configClone here
...
}
Apparently, adding layoutDirection
to the list of android:configChanges
of your <activity>
in the AndroidManifest.xml
fixed this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With