コード私はビデオビューを全画面にして上に閉じる画像ビューを配置する方法は?ここ
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_video_player"
android:layout_width="match_parent"
android:layout_height="match_parent">
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
/>
<ImageView
android:layout_gravity="top|right"
android:src="@android:drawable/ic_menu_close_clear_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>
を試してみましたされたが、結果のレイアウトは、次のようになり、この
フルスクリーンを占有するビデオを作成すると終了ImageViewの右上の位置にビデオの上に表示されるはずですか?
。相対レイアウトとフレームレイアウトを使用すると、close_imageビューのlayout_gravity = "top | right"と同じ結果を得ることができます。 – Geek
@ tahsinRupam私はあなたのコードを試しましたが、それは動作していませんでした。 –