0
我試圖創建一個對話框,顯示前水平視頻查看佈局問題
我拿到了視頻和視圖做工精細之前的視頻(快速教程),但我在佈局的問題我的對話框。
這裏就是我想:
視頻觀看居中水平,並採取儘可能多的空間,因爲它可以。
在那個按鈕下播放。
不幸的是,我不明白爲什麼。
我認爲它來自視頻視圖不在創建時刻啓動。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/test"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<VideoView android:id="@+id/video"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</VideoView>
</LinearLayout>
<Button android:id="@+id/Button01" android:layout_below="@+id/video"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_centerHorizontal="true" android:text="Cancel" />
</LinearLayout>
這是我到了最近,但它仍然沒有好
希望你能幫助
傑森