일행 코드 해독 침몰식 +6.0 동적 권한

1644 단어
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
     !

if (Build.VERSION.SDK_INT >= 21){            View decorView = getWindow().getDecorView();            int option = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;            decorView.setSystemUiVisibility(option);            getWindow().setNavigationBarColor(Color.TRANSPARENT);            getWindow().setStatusBarColor(Color.TRANSPARENT);
        }
전체 투명 효과!
ActivityCompat.requestPermissions(LoginActivity.this, new String[]{
        Manifest.permission.CAMERA,
        Manifest.permission.READ_PHONE_STATE,
        Manifest.permission.ACCESS_COARSE_LOCATION,
        Manifest.permission.READ_SMS,
        Manifest.permission.READ_CONTACTS,
        Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);

좋은 웹페이지 즐겨찾기