Switch crashes when clicked on Android 5.0

后端 未结 5 606
暗喜
暗喜 2021-02-08 04:28

When clicking on a switch in my app in Android 5.0 the app crashes with the logcat shown below. The logcat doesn\'t reference my code anywhere in it, and this switch has worked

5条回答
  •  野的像风
    2021-02-08 05:10

    I faced with the same issue at Sony tablet with Android 5.0.2 - Switch crash my app when activity style is NoTitleBar / FullScreen.

    What worked well for me, is to set FullScreen mode in code and not inside manifest.

    View decorView = getWindow().getDecorView();
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
    decorView.setSystemUiVisibility(uiOptions);
    

    If I don't mess something up, the results is the same as usuall, but without crash.

提交回复
热议问题