2016-05-03 24 views
0

ビデオをフルスクリーン幅で表示する方法。ここでビデオをフルスクリーン幅で表示する方法

<LinearLayout 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"> 

        <VideoView 
         android:layout_width="fill_parent" 
         android:layout_height="200dp" 
         android:id="@+id/video_view" 
         android:layout_alignParentLeft="true" 
         android:layout_alignParentRight="true" 
         android:layout_gravity="center" 

         /> 

       </LinearLayout> 

添付された画像です:

enter image description here

+0

アンドロイドとして親

android:layout_height="fill_parent" 

へと作り:layout_alignParentLeft = "true" のRelativeLayoutで来ます! LinearLayoutではなく –

+1

すべてのレイアウトxmlファイルをアップロードできると便利です –

+0

問題が解決しました – Ahmad

答えて

0

使用RelativeLayout

<RelativeLayout 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"> 

        <VideoView 
         android:layout_width="fill_parent" 
         android:layout_height="200dp" 
         android:id="@+id/video_view" 
         android:layout_alignParentLeft="true" 
         android:layout_alignParentRight="true" 
         android:layout_gravity="center" 

         /> 

       </RelativeLayout> 
0

は、Android mainifistファイルで画面の向きの風景を追加し、

を置きます

RelativeLayout

関連する問題