2

ここに画像の説明を入力

画面上部にギャラリーを追加しました。

ただし、ギャラリーがビデオビューに重なることを意味するビデオをフルスクリーンにすることは可能でしょうか。また、このギャラリーを非表示または表示するには、画面をダブルタップできますか? ジェスチャ検出器を実装しましたが、Gallery で実装できますか? もしそうなら、私にその方法を教えてください。

私のレイアウト:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
    >
<EditText android:id="@+id/path"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
        />
<Gallery  android:id="@+id/gallery"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent" >
<VideoView android:id="@+id/surface_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>
</RelativeLayout>
</LinearLayout>

前もって感謝します!

4

1 に答える 1

0

私はついにそれを行う方法を理解しました。

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
    >
<VideoView 
             android:id="@+id/surface_view"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent">
</VideoView>
<LinearLayout
   android:layout_width="fill_parent"
          android:layout_height="fill_parent" >

<Gallery android:id="@+id/gallery"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
</LinearLayout>
</FrameLayout>

また、ギャラリーには、表示と非表示を切り替える機能があります。公式サイトでその方法を見るのは明らかだと思います。

于 2012-08-23T07:26:35.733 に答える