0
Android的VideoView是否有默認方式顯示回放圖標以及其視頻的第一幀?回放第一幀視頻縮略圖的縮略圖videoview
現在,我正在使用這樣的佈局。
<FrameLayout
android:id="@+id/video_frame"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000">
<VideoView
android:id="@+id/mediaPlaybackView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_centerInParent="true" />
<ImageButton
android:id="@+id/play_button"
android:layout_width="120dp"
android:layout_height="120dp"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitCenter"
android:background="@android:color/transparent"
android:layout_gravity="center_vertical|center_horizontal"
android:src="@drawable/videoicon" />
點擊ImageButton可以播放視頻。
檢查了這一點 http://stackoverflow.com/questions/7037630/how-to-create-a-video-preview-in-android http://stackoverflow.com/questions/8235251/ issue-showing-thumbnail-image-in-videoview – vineetv