修改连拍间隔,修改拍照界面

This commit is contained in:
wangdongsheng
2021-09-09 18:33:23 +08:00
parent 6c39e1f13e
commit 30c374b2d9
13 changed files with 373 additions and 274 deletions

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF444444">
<com.otaliastudios.cameraview.CameraView
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true"
app:cameraPictureSizeAspectRatio="1920:1080"
app:cameraVideoSizeMaxArea="3686400"
app:cameraVideoSizeMaxHeight="1920"
app:cameraVideoSizeMaxWidth="1920"
app:cameraVideoSizeMinArea="1166400"
app:cameraVideoSizeMinHeight="1080"
app:cameraVideoSizeMinWidth="1080"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/capture_picture"
style="@style/user_data_style"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:background="@drawable/user_style"
android:gravity="center"
android:padding="@dimen/fab_margin"
android:text="拍照"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -16,11 +16,12 @@
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cameraPictureSizeMaxArea="3200000"
app:cameraPictureSizeMaxHeight="2000"
app:cameraPictureSizeMinHeight="1000"
app:cameraPictureSizeMaxWidth="2000"
app:cameraPictureSizeMinWidth="1000"
app:cameraVideoSizeMaxArea="3686400"
app:cameraVideoSizeMinArea="1166400"
app:cameraVideoSizeMaxHeight="1920"
app:cameraVideoSizeMinHeight="1080"
app:cameraVideoSizeMaxWidth="1920"
app:cameraVideoSizeMinWidth="1080"
app:cameraPictureSizeAspectRatio="1920:1080"
android:keepScreenOn="true"
app:layout_constraintBottom_toBottomOf="parent"
@@ -90,7 +91,6 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="25dp"
android:text="切换"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.PoiPictureActivity">
<com.otaliastudios.cameraview.CameraView
android:id="@+id/poi_picture_camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cameraPictureSizeMaxArea="3200000"
app:cameraPictureSizeMaxHeight="2000"
app:cameraPictureSizeMinHeight="1000"
app:cameraPictureSizeMaxWidth="2000"
app:cameraPictureSizeMinWidth="1000"
app:cameraPictureSizeAspectRatio="1920:1080"
android:keepScreenOn="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/capture_poi_picture"
style="@style/user_data_style"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:background="@drawable/user_style"
android:button="@null"
android:gravity="center"
android:padding="@dimen/fab_margin"
android:text="开始采集"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/btn_stop_poi_picture" />
<Button
android:id="@+id/btn_stop_poi_picture"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:background="@drawable/uploding_shape"
android:text="结束采集"
android:textColor="@color/colorBlue"
app:layout_constraintBottom_toBottomOf="@id/capture_poi_picture"
app:layout_constraintLeft_toRightOf="@id/capture_poi_picture"
app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>