내가 알고 있는 사람이 질문을 찾을 수 있습니다 자신의 솔루션이지만 사람들은 여전히 해결책을 찾고 이것은 아주 간단한 해결책이지만 한 가지는 한계가 있어까지Kitkat
너무 조건이 추가
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
이러한 추가Base 응용 프로그램 테마에styles.xml
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
추가 다음과 같은 특성하는 부모의 레이아웃:
android:fitsSystemWindows="false"
이게 도움이 되었으면 좋겠습니다.
는하려는 경우,당신은 당신의"반투명 navigation"투명하고,여기에 코드를만 투명한 상태 표시줄
에서 당신의 테마
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowTranslucentStatus">true</item>
에서 당신의 활동 onCreate:
Window window = getWindow();
WindowManager.LayoutParams winParams = window.getAttributes();
winParams.flags &= ~WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
window.setAttributes(winParams);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
이 코드를 사용할 수 있습 후 onCreate
setTheme(android.R.style.Theme_Black_NoTitleBar_Fullscreen);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
귀하의 활동이 될 것입니다 fullscrean 상태 bar:)
하려고 다음과 같이
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
희망이 하나를 데 도움이 될 것입
@tahsinRupam답이 올바른 테스트에 게시 Kitkat 버전입니다.
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
하려는 경우에만 사용한 특정 활동,스타일을 창조,연결에 당신의 명시일 이와 같습니다.
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="@style/Activity.Fullscreen.Theme" />
<style name="Activity.Fullscreen.Theme" parent="MyMaterialTheme.Base">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
엄지손가락에 origal@tahsinRupam
행복한다.Cheers!
이 코드에 당신의 활동 onCreate 이 숨기기 상태 표시줄
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();