[英]App leave blank space in bottom
伙计我的应用程序在屏幕底部留下了导航按钮的空白区域。
请帮我纠正
因为我们可以在底部留下空白,而其他应用程序是正常的。
这是我的style.xml代码:
<style name="AppBaseTheme" parent="android:Theme.Light"></style>
这是清单文件中的活动代码:
<activity
android:name="unknown"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
编辑:我做了一切,但没有任何工作,但问题似乎与编辑。 我用android studio创建了一个带有所有相同代码和主题的应用程序它显示它很好但是当我使用eclipse时,它显示底部的空白区域。 这太烦人了。
尝试
< activity
android:name="unknown"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@style/AppTheme.NoActionBar" >
要解决这个问题,你应该将android:xlargeScreens=true
添加到AndroidManifest.xml
supports-screens
标签。
尝试删除主题
android:theme="@android:style/Theme.Translucent.NoTitleBar"
或者你可以尝试下面的主题
android:theme="@android:style/Theme.NoTitleBar"
采用
android:theme="@android:style/Theme.Light.NoTitleBar"
要么
android:theme="@android:style/Theme.NoTitleBar"
代替
android:theme="@android:style/Theme.Translucent.NoTitleBar"
在styles.xml中创建以下样式
<style name="AppTheme.NoActionBarTransparentstatusBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
对于您在Manifest.xml中的活动,请添加以下内容
android:theme="@style/AppTheme.NoActionBarTransparentstatusBar"
到你的活动布局xml文件添加
android:fitsSystemWindows="true"
在活动onCreate方法中添加以下内容。
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow(); // in Activity's onCreate() for instance
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
如果这是一个基于浏览器的应用程序,那么开发团队会跟踪Chrome中的已知问题,在新主题安装后会出现白条。 它可能是相关的。 我有一个html介绍屏幕同样的问题。 在Firefox和IE中显示完美,在Chrome中我在底部获得了一个空白区域并没有任何帮助; AS等中的填充,边距,主题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.