Android. Transparent-Lay-out über ein anderes layout

Bin ich die Entwicklung von video-player und ich brauche eine display-SeekBar, die aktuelle Zeit in text-Ansicht, video, Länge-text-anzeigen über mein video ansehen. Ich brauche auch tho setzen, die in jedem Layout einen transparenten hintergrund. Ich habe einige Themen hier im Stackoverflow, aber Sie hat keine Hilfe bei der Lösung meines Problems. Kann mir jemand helfen bitte!!! Ich danke Ihnen sehr viel!
Hier ist mein xml-layout für videoplayer.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/video_main_container"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" >
 <!-- This is Layout that must be in the top of my video view --->
<LinearLayout
    android:id="@+id/streams"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:background="#40ffffff"
    android:orientation="horizontal"
    android:visibility="gone" >

    <Spinner
        android:id="@+id/language_spinner"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1" />

    <Spinner
        android:id="@+id/subtitle_spinner"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1" />

    <ImageView
        android:id="@+id/full_screen"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_weight="1"
        android:src="@drawable/logo_fullscreen" />

</LinearLayout>
<!-- This is layout with seekbar and text views with current time, video file length -->
<!-- I need to show it on the bottom of my video view -->
<RelativeLayout
    android:id="@+id/controls"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:backgroundDimEnabled="true"
    android:background="#00ffffff"
    >

    <Button
        android:id="@+id/play_pause"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:drawable/ic_media_play"
        android:contentDescription="@null"
        android:enabled="false" />

    <Button
        android:id="@+id/scale_type"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@+id/play_pause"
        android:background="@android:drawable/ic_menu_info_details"
        android:enabled="true" />

    <SeekBar
        android:id="@+id/seek_bar"
        android:alpha="0.5"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_toRightOf="@+id/scale_type" />

    <TextView
        android:layout_margin="3dp"
        android:id="@+id/current_time_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/seek_bar"
        android:layout_alignLeft="@+id/seek_bar"
        android:text="" />

    <TextView
        android:layout_margin="3dp"
        android:id="@+id/video_length_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/seek_bar"
        android:layout_alignRight="@+id/seek_bar"
        android:text="" />

</RelativeLayout>
    <!-- This is my VideoView, all controls I must display over it --->
<com.ffmpeg.FFmpegSurfaceView
    android:id="@+id/video_view"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_above="@+id/controls"
    android:layout_below="@+id/streams"
    android:visibility="visible" />
</RelativeLayout>
bessere Nutzung framelayout
das layout, das Sie transparent machen möchten.
Ich möchte transparent zu machen, werden alle layouts. Mein video anzeigen muss "Vollbild", und andere Steuerelemente müssen auf die Spitze in transparent-layouts. Hier ist ein Beispiel i.stack.imgur.com/lnBef.jpg

InformationsquelleAutor bukka.wh | 2014-02-04

Schreibe einen Kommentar