Android Question Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Changing from targetSdkVersion="26" to targetSdkVersion="28", I got the following error:
Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

It seems to do something with my Translucent screens:
SetActivityAttribute(Synchroniseer, android:theme, "@android:style/Theme.Translucent")
Remark this line solved the problem, but also displays as screen instead of Transparant.

Changing back to target="26" all is fine.

Is there still support for Translucent screens in target="28"?
Someone has a solution?

Best regards,
André
 

AHilberink

Active Member
Licensed User
Longtime User
This is no longer possible.
It work on some devices (Xiaomi for example), but don't work on any Samsung device with Android 8.0 and newer.
Check this : https://developpaper.com/only-fullscreen-opaque-activities-can-request-orientation/

Thanks, Pendrush for pointing me to that directions.

The solution seems to be simple, just added to manifest before the TranslucentAttribute:
SetActivityAttribute(Synchroniseer, android:screenOrientation, "unspecified")

Now it works fine with Target="28".

Best regards,
André
 
Upvote 0
Top