Android的 - 状态栏prevents全屏全屏、状态栏、Android、prevents

2023-09-04 13:39:23 作者:寒山转苍翠

当它开始我的应用程序正常运行在全屏。最小化,然后返回到应用程序之后,但是,状态栏弹出,推我的看法下来了一点。我怎样才能保持状态栏移动我的意见?

My app correctly runs in full screen when it's started. However after minimizing and then returning to the app, the status bar pops up and pushes my views down a little. How can I keep the status bar from moving my views?

下面是我的布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/com.example.draw"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
    <com.example.draw.DrawView 
        android:id="@+id/draw"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:visibility="visible"
        android:fitsSystemWindows="false"
    />      
<com.admob.android.ads.AdView     
       android:id="@+id/ad" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content"
       myapp:backgroundColor="#000000"
       myapp:primaryTextColor="#FFFFFF"
       myapp:secondaryTextColor="#CCCCCC"
       android:layout_gravity="bottom"
/>     

下面是我的活动的onCreate的一部分:

Here is part of my activity's onCreate:

requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN);  

我也有清单中的全屏主题:

I also have the fullscreen theme in the manifest:

android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"

感谢

推荐答案

有已知错误与状态栏/通知栏。

There are known bugs with the status bar / notification bar.

请参阅:

HTTP://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 3674

HTTP://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 8052

HTTP://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 5906