!10 完成寻宝拍照功能

* 完成寻宝-道路拍照
This commit is contained in:
Amdi
2021-06-11 17:43:52 +08:00
committed by 肖岩
parent e9e0c175f3
commit e93fff2cef
29 changed files with 1637 additions and 63 deletions

View File

@@ -0,0 +1,156 @@
<?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:id="@+id/root"
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="0dp"
android:layout_gravity="center"
android:keepScreenOn="true"
app:cameraAudio="on"
app:cameraAutoFocusMarker="@string/cameraview_default_autofocus_marker"
app:cameraEngine="camera2"
app:cameraExperimental="true"
app:cameraFacing="back"
app:cameraFlash="auto"
app:cameraGestureLongTap="none"
app:cameraGesturePinch="zoom"
app:cameraGestureScrollHorizontal="filterControl1"
app:cameraGestureScrollVertical="exposureCorrection"
app:cameraGestureTap="autoFocus"
app:cameraGrid="off"
app:cameraMode="picture"
app:cameraPlaySounds="true"
app:cameraPreview="glSurface"
app:layout_constraintBottom_toTopOf="@id/ll_iv"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="-76dp">
</com.otaliastudios.cameraview.CameraView>
<com.tencent.tencentmap.mapsdk.maps.MapView
android:id="@+id/iv_map"
android:layout_width="300dp"
android:layout_height="183dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btn_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:text="切换"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
app:layout_constraintTop_toBottomOf="@id/btn_switch"
app:layout_constraintRight_toRightOf="@id/btn_switch"
android:id="@+id/btn_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="停止" />
<ImageView
android:id="@+id/iv_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/take_pic_arrow"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/ll_iv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:padding="16dp"
android:weightSum="4"
app:layout_constraintBottom_toBottomOf="parent">
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageButton
android:id="@+id/capturePicture"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_photo" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<LinearLayout
android:id="@+id/capturePictureSnapshot"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_photo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SNAP"
android:textColor="@android:color/white"
android:textSize="10sp"
android:textStyle="bold" />
</LinearLayout>
<ImageButton
android:id="@+id/captureVideo"
android:layout_width="56dp"
android:layout_height="56dp"
android:background="?attr/selectableItemBackgroundBorderless"
app:srcCompat="@drawable/ic_video" />
<!-- <LinearLayout-->
<!-- android:id="@+id/captureVideoSnapshot"-->
<!-- android:layout_width="56dp"-->
<!-- android:layout_height="56dp"-->
<!-- android:orientation="vertical"-->
<!-- android:background="?attr/selectableItemBackgroundBorderless"-->
<!-- android:gravity="center" >-->
<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:srcCompat="@drawable/ic_video"/>-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textColor="@android:color/white"-->
<!-- android:textStyle="bold"-->
<!-- android:textSize="10sp"-->
<!-- android:text="SNAP"/>-->
<!-- </LinearLayout>-->
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>