我希望能夠顯示一個按鈕以啓動一個視頻,該視頻集中在視頻將播放的同一視圖中(使用VideoView)。我也希望按鈕在點擊後消失,因爲我使用MediaController類在視頻啓動後執行暫停,後退,快進操作。在Android中的VideoView上顯示和隱藏播放按鈕
我該怎麼做?
這裏的佈局我到目前爲止:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/video_frame"
android:layout_width="fill_parent"
android:layout_height="480px"
android:background="#000"
>
<VideoView
android:id="@+id/video_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</FrameLayout>
我試着編程方式添加的ImageButton到的FrameLayout,但似乎並沒有工作。
如果我理解正確這,是你想放置VideoView內按鈕提拉? – crazylpfan 2013-03-09 01:27:46
並非像VideoView那麼多。 – 2013-03-09 01:49:38