2
을 숨기고 때 시스템 막대를 숨기는 방법입니다.을 잃고 초점을 나는 또한 자동으로 짧은 시간 후 시스템 표시 줄을 숨기고있어, 잠금 화면의 상단에 표시되는 웹보기를 사용하고 시스템 바
/**
* Hide system bar.
* Different methods applied depending on the SDK version
*
* @param context
*/
@SuppressLint("InlinedApi")
@SuppressWarnings("deprecation")
public void hideSystemBar(Context context) {
if (SDK_INT < FOURTEEN) {
Log.i("WebViewClient", "hideSystemBar: < 14 ");
((Activity) context).getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
} else if (SDK_INT >= FOURTEEN && SDK_INT < SIXTEEN) {
Log.i("WebViewClient", "hideSystemBar: 14 - 16");
((Activity) context).getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE // 14
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); // 14
} else if (SDK_INT >= SIXTEEN) {
Log.i("WebViewClient", "hideSystemBar: > 16");
((Activity) context).getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE // 14
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // 14
| View.SYSTEM_UI_FLAG_FULLSCREEN); // 16
}
}
문제는 제가 사용하고있는 웹 뷰가 초점을 잃어 버리는 것입니다. 내 추측은 다음과 같습니다. ((Activity) context).getWindow().getDecorView()
잠긴 화면 위에 액티비티를 표시하고 포커스를 잃지 않고 시스템 표시 줄을 숨기는 또 다른 방법이 있습니까?
감사합니다.
이렇게 관리 했습니까? – Moxor