java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

前端 未结 30 1726
难免孤独
难免孤独 2020-12-02 04:43

I am facing the problem while retrieving the contacts from the contact book in Android 8.0 Oreo java.lang.IllegalStateException: Only fullscreen opaque activities can reques

30条回答
  •  无人及你
    2020-12-02 05:46

    The only thing that worked for me was changing

    android:screenOrientation="portrait"
    

    to

    android:screenOrientation="unspecified"
    

    in the manifest for all translucent activities.

    That way it is compatible with all API versions since the translucent activity seems to inherit its orientation from the parent activity as of targetApi: 28.

    The style can be left as it is including true.

提交回复
热议问题