Android 视频暂停时不反映视频视图布局更改
我有一个布局,它有一个视频视图作为它的孩子和另一个导航栏,显示在触摸屏上Android 视频暂停时不反映视频视图布局更改,android,orientation,android-videoview,Android,Orientation,Android Videoview,我有一个布局,它有一个视频视图作为它的孩子和另一个导航栏,显示在触摸屏上 <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/main_background" android:orientation="vertical"> <Relativ
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/main_background"
android:orientation="vertical">
<RelativeLayout android:id="@+id/mediaplayer_navigation_bar_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/main_header"
android:orientation="horizontal">
<Button
android:id="@+id/mediaplayer_navigation_back"
android:layout_width="80dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:ellipsize="end"
android:layout_marginLeft="5dp"
android:singleLine="true"
android:paddingLeft="5dp"
style="@style/text_shadow"
android:text="Back"
android:textColor="@color/navigation_bar_text_color"
android:textSize="15sp"
android:textStyle="bold"
android:background="@drawable/back_arrow_button_click"
android:onClick="mediaplayerBackButtonClickHandler" />
<TextView
android:id="@+id/mediaplayer_navigation_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:background="@color/tranceparent"
android:paddingLeft="20dp"
style="@style/text_shadow"
android:textColor="@color/navigation_bar_text_color"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout>
<VideoView
android:id="@+id/my_video"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true" >
</VideoView>
</RelativeLayout>
我面临的问题是,当设备处于纵向模式且导航栏可见时,我暂停视频并切换到横向和触摸以使导航栏消失,黑色栏位于视频中导航栏所在的位置。
我尝试了无效设置布局参数,但似乎没有任何改变
这可能是设备特定的问题吗?我目前正在测试HTC Sensation
更新
此问题在三星S2中不可再现,但在Asus选项卡中类似场景中的其他视图问题:(什么是RelativeLayout的父项?另一个相对布局,我已更新了xml字段我是否有您的主要背景样式代码?@iDroidExplorer它除了设置高度、宽度和背景颜色外,没有其他功能。您能删除该行并重试一次吗?请告诉我