Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
MediaRecorder / res / layout /

sample_main.xml

       
        1
       
       
        <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
       
       
        2
       
       
        xmlns:tools="http://schemas.android.com/tools"
       
       
        3
       
       
        android:layout_width="match_parent"
       
       
        4
       
       
        android:layout_height="match_parent"
       
       
        5
       
       
        android:paddingLeft="@dimen/activity_horizontal_margin"
       
       
        6
       
       
        android:paddingRight="@dimen/activity_horizontal_margin"
       
       
        7
       
       
        android:paddingTop="@dimen/activity_vertical_margin"
       
       
        8
       
       
        android:paddingBottom="@dimen/activity_vertical_margin"
       
       
        9
       
       
        android:orientation="vertical"
       
       
        10
       
       
        tools:context=".MainActivity">
       
       
        11
       
       
       
       
        12
       
       
        <TextureView
       
       
        13
       
       
        android:layout_width="fill_parent"
       
       
        14
       
       
        android:layout_height="wrap_content"
       
       
        15
       
       
        android:id="@+id/surface_view" />
       
       
        16
       
       
       
       
        17
       
       
        <Button
       
       
        18
       
       
        android:layout_width="fill_parent"
       
       
        19
       
       
        android:layout_height="wrap_content"
       
       
        20
       
       
        android:id="@+id/button_capture"
       
       
        21
       
       
        android:layout_gravity="bottom"
       
       
        22
       
       
        android:onClick="onCaptureClick"
       
       
        23
       
       
        android:text="@string/btnCapture"/>
       
       
        24
       
       
        </FrameLayout>