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

前端 未结 30 1707
难免孤独
难免孤独 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:26

    The problem seems to be happening when your target sdk is 28. So after trying out many options finally this worked.

    
    

    style:-

    
    

    Note:parent="Theme.AppCompat.Light.NoActionBar" is needed for api 28. Previously had something else at api 26. Was working great but started to give problem at 28. Hope it helps someone out here. EDIT: For some only by setting false and false worked.May be depends upon the way you implement the solution works.In my case it worked by setting them to true.

提交回复
热议问题