|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
android:background="#ff000000"
|
|
|
|
tools:context=".view.USBCameraActivity"
|
|
|
|
tools:ignore="MergeRootFrame">
|
|
|
|
|
|
|
|
<com.serenegiant.usb.widget.UVCCameraTextureView
|
|
|
|
android:id="@+id/camera_view"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
android:layout_centerHorizontal="true"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:id="@+id/btn_capture_pic"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
android:layout_marginBottom="10dp"
|
|
|
|
android:layout_marginRight="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:textSize="16sp"
|
|
|
|
android:text="抓拍"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:layout_above="@id/btn_capture_pic"
|
|
|
|
android:id="@+id/btn_rec_video"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginRight="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:textSize="16sp"
|
|
|
|
android:text="开始录制"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:layout_above="@id/btn_rec_video"
|
|
|
|
android:id="@+id/btn_update_resolution"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginRight="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:textSize="16sp"
|
|
|
|
android:text="切换分辨率为320x240"/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
android:layout_above="@id/btn_update_resolution"
|
|
|
|
android:id="@+id/btn_restart_camera"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginRight="10dp"
|
|
|
|
android:layout_marginLeft="10dp"
|
|
|
|
android:textSize="16sp"
|
|
|
|
android:text="重启摄像头"/>
|
|
|
|
|
|
|
|
</RelativeLayout>
|