Android Andriod:导航栏隐藏,但活动不是填充屏幕
尝试创建一个简单的全屏视频播放应用程序。 导航栏隐藏,但活动未填充屏幕。 我错过了什么 活动:Android Andriod:导航栏隐藏,但活动不是填充屏幕,android,Android,尝试创建一个简单的全屏视频播放应用程序。 导航栏隐藏,但活动未填充屏幕。 我错过了什么 活动: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_pa
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="my.test.app2.VViewer">
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout >
活动主题
<style name="AppTheme.FullscreenTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
真的
假的
真的
@空的
您可以尝试以下方法:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_全屏,
WindowManager.LayoutParams.FLAG(全屏) 您可以尝试以下方法:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_全屏,
WindowManager.LayoutParams.FLAG(全屏) 我的代码适用于16:9屏幕设备。仅在18:9设备上出现问题。 我不明白为什么,但是
<meta-data android:name="android.max_aspect" android:value="2.1" />
android清单文件的应用程序部分解决了这个问题。我的代码适用于16:9屏幕设备。仅在18:9设备上出现问题。 我不明白为什么,但是
<meta-data android:name="android.max_aspect" android:value="2.1" />
android清单文件的应用程序部分解决了问题。找到解决方案了吗?找到解决方案了吗?