在 VideoView 之上的 TextView 背景无法设置

华宰 发布于 2011/07/14 10:10
阅读 1K+
收藏 0

我在一个layout中使用了一个 TextView 和 VideoView ,XML代码如下:

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:gravity="center_vertical|center_horizontal">

<VideoView
    android:id="@+id/vView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|center_horizontal"
/>
<TextView
    android:id="@+id/txtNote"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="top"
    android:gravity="center"
    android:layout_marginTop="100px"        
    android:textSize="30sp"
    android:textStyle="bold"
    android:background="#A000"
    android:textColor="#ffff"
/>

</merge>

我给 TextBox 设置一个 "android:background="#A000"" 属性,但不起作用。但是当我把 VideoView 改成 ImageView 的时候就没问题,请问这大概是什么情况呢?多谢了

加载中
0
错II过
错II过
加个android:layout_weight试试  两个都加  数值相等
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部