I want to implement video panel in android in which i want to create a task panel which contain command such like play, pause. i have created a layout for this is
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layout">
<VideoView
android:id="@+id/videoView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:textColor="@color/RED"
android:text="HI"></TextView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rLayoutCameraButtons"
android:layout_gravity="center|bottom">
<SeekBar
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10px"
android:id="@+id/seekbar"
android:max="100"
android:layout_alignParentTop="true"
/>
<RelativeLayout
android:id="@+id/rlayout_buttons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/seekbar"
>
<Button
android:id="@+id/buttonPlay"
android:text="Play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
</Button>
<Button
android:layout_alignParentLeft="true"
android:id="@+id/buttonStop"
android:text="Stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>
<Button
android:id="@+id/buttonPause"
android:text="Pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
</Button>
</RelativeLayout>
</RelativeLayout>
i want to hide auto hide my relative layout withing 5 sec from the last touch on that
also i want to make it appear on touch on that area where it existed. not getting any idea
plz help
Are you aware of
MediaController? If you don’t need to customize your panel too much, it’s the simple and elegant solution you’re looking for. You can simply start with:Here‘s an example of the
MediaControllerbeing used in the 3D Gallery app.