我遇到了顯示佈局問題。 當您放置可見時,Relativelayout @ + id/media不可見。他仍然在Relativelayout @ + id/media2下,可以從dpad中選擇,但仍然在其他下。未選擇Android電視按鈕
如果零件放了media2第一和第二個媒體。媒體可見時,但不能選擇dpad。
有一定的順序使媒體儘管首先被寫在media2之上嗎? 謝謝
佈局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/app_video_box"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#000"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/media"
android:layout_marginLeft="32dp"
android:layout_marginRight="32dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:gravity="center_vertical|center_horizontal|center"
android:layout_marginLeft="32dp"
android:layout_marginRight="32dp"
android:animateLayoutChanges="true"
android:background="#e72a2a"
android:id="@+id/relativeLayout">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Back"
android:id="@+id/button2"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button"
android:layout_toEndOf="@+id/button" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Play"
android:id="@+id/button" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:id="@+id/button3"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button2"
android:layout_toEndOf="@+id/button2" />
</RelativeLayout>
<SeekBar
android:id="@+id/app_video_seekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:layout_above="@+id/relativeLayout"
android:layout_alignLeft="@+id/relativeLayout"
android:layout_alignStart="@+id/relativeLayout"
android:layout_alignRight="@+id/relativeLayout"
android:layout_alignEnd="@+id/relativeLayout" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/media2"
android:layout_width="match_parent"
android:layout_height="match_parent">
<tcking.github.com.giraffeplayer.IjkVideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
</RelativeLayout>
您需要爲媒體和媒體2指定相對位置,就像您爲其他控件所做的一樣。 – muratgu
你能給我更多的細節嗎? –