VideoView上的徽标?

问题描述:

我在我的应用程序上有一个videoview。VideoView上的徽标?

我可以把按钮放在videoview上,但imageview我不能放它。

布局:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" > 
<VideoView android:id="@+id/video_view" 
    android:layout_width="fill_parent" 
    android:layout_alignParentRight="true" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:layout_alignParentBottom="true" 
    android:layout_height="fill_parent"> 
</VideoView> 

<Button 
    android:id="@+id/button1" 
    android:layout_width="280dp" 
    android:layout_height="wrap_content" 
    android:layout_marginBottom="22dp" 
    android:background="@drawable/button" 
    android:text="@string/login" 
    android:layout_above="@+id/button2" 
    android:layout_alignLeft="@+id/button2" 
    android:layout_alignStart="@+id/button2" /> 

<Button 
    android:id="@+id/button2" 
    android:layout_width="280dp" 
    android:layout_height="wrap_content" 
    android:layout_marginBottom="109dp" 
    android:background="@drawable/button" 
    android:text="@string/signup" 
    android:layout_alignParentBottom="true" 
    android:layout_centerHorizontal="true" /> 

活动: My Activity.txt

我想把标志上的视频。我能做些什么呢?

+0

使用框架布局,并把在视频查看 – rahul

+0

我用顶部的标志“ImageView的”。但也没有工作。 –

+0

你可以分享你想要实现的UI吗? – rahul

我解决此问题与Android:背景资料。

<VideoView android:id="@+id/video_view" 
android:layout_width="fill_parent" 
android:layout_alignParentRight="true" 
android:layout_alignParentLeft="true" 
android:layout_alignParentTop="true" 
android:layout_alignParentBottom="true" 
android:layout_height="fill_parent" 
android:background="@drawable/pngname"> 

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <VideoView 
    android:id="@+id/yourVideoViewId" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"/> 

    <ImageView 
    android:id="@+id/yourImageViewId" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@mipmap/ic_launcher"/> 

</FrameLayout> 

试试这个

+0

我累了,也许10次。还是行不通。 –