:숨기기 안드로이드 상태 표시 줄 나는 다음과 같은 코드를 사용하여 내 활동에서 안드로이드 상태 표시 줄을 숨기기 위해 노력하고
에서 OnCreate 코드 :
는// set as full screen
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
protected void onResume() {
super.onResume();
// set as full screen
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
protected void onWindowFocusChanged() {
// set as full screen
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
상태 표시 줄이를 메뉴를 선택할 때까지 숨겨집니다 (메뉴 아래 코드).
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.help) {
homehelp = 0; // reset the homehelp logic
homehelp(); // call it to display
}
return false;
}
메뉴를 팽창시키는 선택은 상태 표시 줄을 표시합니다 - 전원 끄기/켜기로 강제로 다시 시작하거나 내 활동에서 벗어날 때까지 상태 표시 줄은 유지됩니다.
누군가가 메뉴 인플레이션/선택으로 상태 표시 줄을 숨기는 방법을 제안 할 수 있습니까?
감사합니다.
앤디
을 시도하려고? – user2235615