Dynamic cut horizontal and vertical screen

There is a need for horizontal screen reading, very simple, only a few lines of code

 mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                if (isChecked) {
                    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
             }else {
                    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

                }
            }
        });

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325624047&siteId=291194637