feat(settings): add save button and persist settings; refactor for recoder name; update UI texts
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Fri Mar 06 18:59:47 CST 2026
|
||||
#Fri Mar 06 19:06:55 CST 2026
|
||||
path.4=14/classes.dex
|
||||
path.3=12/classes.dex
|
||||
path.2=10/classes.dex
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
27
|
||||
28
|
||||
0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
ëXè¾ú¹Ñ~Ì>Ň
|
||||
ëXè¾ú¹Ñ~Ì>Ňôï`
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.provider.Settings
|
||||
import android.graphics.Bitmap
|
||||
import android.media.MediaActionSound
|
||||
import android.graphics.BitmapFactory
|
||||
import android.net.Uri
|
||||
import android.util.Log
|
||||
@@ -76,6 +77,7 @@ import com.inspection.camera.util.LocationHelper
|
||||
import com.inspection.camera.util.PermissionManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import java.io.File
|
||||
@@ -105,6 +107,11 @@ fun CameraScreen(
|
||||
|
||||
val capturedImages = remember { mutableStateListOf<Uri>() }
|
||||
val locationHelper = remember { LocationHelper(context) }
|
||||
val shutterSound = remember { MediaActionSound() }
|
||||
var flashVisible by remember { mutableStateOf(false) }
|
||||
LaunchedEffect(Unit) {
|
||||
shutterSound.load(MediaActionSound.SHUTTER_CLICK)
|
||||
}
|
||||
|
||||
// 权限状态
|
||||
val permissionsState = rememberMultiplePermissionsState(
|
||||
@@ -192,7 +199,14 @@ fun CameraScreen(
|
||||
isLocationLoading = false
|
||||
}
|
||||
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
// 闪屏效果覆盖层(拍照成功时显示)
|
||||
if (flashVisible) {
|
||||
Box(modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color.White.copy(alpha = 0.9f))
|
||||
)
|
||||
}
|
||||
if (permissionsState.allPermissionsGranted) {
|
||||
CameraContent(
|
||||
flashMode = flashMode,
|
||||
@@ -211,9 +225,15 @@ fun CameraScreen(
|
||||
onComplete = { uri ->
|
||||
capturedImages.add(uri)
|
||||
isCapturing = false
|
||||
|
||||
},
|
||||
onError = {
|
||||
isCapturing = false
|
||||
},
|
||||
onFeedback = {
|
||||
shutterSound.play(MediaActionSound.SHUTTER_CLICK)
|
||||
flashVisible = true
|
||||
scope.launch { delay(150); flashVisible = false }
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -506,7 +526,8 @@ private fun capturePhoto(
|
||||
imageQuality: ImageQuality,
|
||||
locationText: String,
|
||||
onComplete: (Uri) -> Unit,
|
||||
onError: () -> Unit = {}
|
||||
onError: () -> Unit = {},
|
||||
onFeedback: (() -> Unit)? = null
|
||||
) {
|
||||
Log.d("CameraScreen", "capturePhoto called, locationText=$locationText")
|
||||
val photoFile = File(
|
||||
@@ -530,8 +551,9 @@ private fun capturePhoto(
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
val timeText = ImageProcessor.getCurrentTimeText()
|
||||
try {
|
||||
onFeedback?.invoke()
|
||||
val timeText = ImageProcessor.getCurrentTimeText()
|
||||
Log.d("CameraScreen", "Adding watermark: timeText=$timeText, locationText=$locationText")
|
||||
val watermarkedBitmap = ImageProcessor.addWatermark(
|
||||
bitmap,
|
||||
|
||||
Reference in New Issue
Block a user