I lock the device screen, start the activity LockAct. LockAct starts another activity which has a SurfaceView.
If I don't add <item name="android:windowBackground">@android:color/transparent</item> to the activity with the SurfaceView, neither surfaceCreated nor surfaceChanged will be called.
If I add <item name="android:windowBackground">@android:color/transparent</item> to the activity with the SurfaceView, LockAct disappears and slides in on Android 5.0 only as shown in the video. It looks ugly.
How to prevent LockAct from disappearing and sliding in again?
What I've already tried:
ActivityOptions for LockAct
Intent intent = new Intent(getApplicationContext(), LockAct.class);
startActivity(intent, ActivityOptions.makeCustomAnimation(getApplicationContext(), 0, 0).toBundle());
android:windowAnimationStyle for LockAct
<style name="NoAnim" parent="@style/AppTheme">
<item name="android:windowAnimationStyle">@null</item>
</style>
<activity android:name="com.admin.LockAct"
android:theme="@style/NoAnim" />
android:windowEnterTransition and android:windowExitTransition for LockAct
<style name="NoAnim" parent="@style/AppTheme">
<item name="android:windowEnterTransition">@null</item>
<item name="android:windowExitTransition">@null</item>
</style>
<activity android:name="com.admin.LockAct"
android:theme="@style/NoAnim" />
Here is an archive with my sample Android app: https://www.dropbox.com/s/mc4pzqwc2o8lsej/Sample-Android-Lock.rar?dl=0