From 02999f0d54a94b7bd7603871b5015ddae812a70a Mon Sep 17 00:00:00 2001 From: shenzuqiang Date: Thu, 26 Mar 2026 10:30:22 +0800 Subject: [PATCH] =?UTF-8?q?Dev=EF=BC=9A=201=E3=80=81=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E6=95=8F=E6=84=9F=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 6 ------ .../java/com/img/rabbit/components/ImagePicker.kt | 15 +++++++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5ac3305..e1b0d34 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,14 +1,8 @@ - - - - (null) } // 新增选择对话框 - var showChoiceDialog by remember { mutableStateOf(false) } + //var showChoiceDialog by remember { mutableStateOf(false) } // 新增大图预览状态 var previewImageUri by remember { mutableStateOf(null) } @@ -130,7 +130,7 @@ fun ImagePicker( } } - + /* if (showChoiceDialog) { AlertDialog( onDismissRequest = { showChoiceDialog = false }, @@ -160,6 +160,7 @@ fun ImagePicker( } ) } + */ // 全屏大图对话框 previewImageUri?.let { uri -> @@ -217,7 +218,10 @@ fun ImagePicker( AddSingleButton( imageHeight = imageHeight, aspectRatio = aspectRatio, - onClick = { showChoiceDialog = true }, + onClick = { + galleryLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)) + //showChoiceDialog = true + }, label = addButtonName, ) }else{ @@ -226,7 +230,10 @@ fun ImagePicker( contentAlignment = Alignment.BottomCenter ) { AddButton( - onClick = { showChoiceDialog = true }, + onClick = { + galleryLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)) + //showChoiceDialog = true + }, label = addButtonName, ) }