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>

これは私が到達した最も近いものですが、それでも良くありません

あなたが助けることができることを願っています

ジェイソン

4

2 に答える 2

2

これを試して:

<RelativeLayout android:id="@+id/test"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
  <Button android:id="@+id/Button01"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_alignParentBottom="true"
     android:text="Cancel" />
  <VideoView android:id="@+id/video"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:layout_above="@id/Button01"
    android:layout_centerInParent="true" />
</LinearLayout>
于 2011-10-07T11:37:40.360 に答える
0

次のプロパティをLinearLayout-TestとButton-Button01に追加するだけです。

android:layout_weight="1"
于 2011-10-07T07:57:42.930 に答える