【发布时间】:2015-02-19 18:01:59
【问题描述】:
我想像 youtube 一样全屏视频缩小和扩大点击全屏视频点击全屏图像按钮我想视频全屏我使用片段。
我的 videoplayer.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/videolayout"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:gravity="center_horizontal" >
<VideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
</LinearLayout>
<ProgressBar
android:id="@+id/progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
<FrameLayout
android:id="@+id/mediaController"
android:layout_width="fill_parent"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
android:background="#80000000"
android:visibility="gone" >
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_marginTop="5dp"
/>
<ImageButton
android:id="@+id/btnpalypause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:layout_marginBottom="8dp"
/>
<ImageButton
android:id="@+id/fullscreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|bottom"
android:layout_marginBottom="5dp"
android:layout_marginLeft="7dp"
android:src="@drawable/maximize" />
</FrameLayout>
</RelativeLayout>
只要在全屏图像按钮点击事件上告诉我我在做什么......
【问题讨论】: