Compare commits
3 Commits
1c435f2c66
...
f8b2ddb42c
| Author | SHA1 | Date |
|---|---|---|
|
|
f8b2ddb42c | |
|
|
6b178ed9b1 | |
|
|
02999f0d54 |
|
|
@ -1,14 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- 读取相册权限-Android 12及以下版本的权限,如果你不需要特定相机功能,可以添加下面这行降低过滤限制 -->
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.camera"
|
|
||||||
android:required="false" />
|
|
||||||
<!-- 在Android14及以上版本读取SelectedPhotoAccess需要添加READ_MEDIA_VISUAL_USER_SELECTED权限 -->
|
<!-- 在Android14及以上版本读取SelectedPhotoAccess需要添加READ_MEDIA_VISUAL_USER_SELECTED权限 -->
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
|
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
|
||||||
<!--相机权限,用于打开相机和拍照:如用户反馈等-->
|
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
|
||||||
<!-- 写入外部存储权限,用于保存拍照后的图片或者下载文件,主要兼容Android 13及以下版本(Android13以上高版本不需要,但低版本必须) -->
|
<!-- 写入外部存储权限,用于保存拍照后的图片或者下载文件,主要兼容Android 13及以下版本(Android13以上高版本不需要,但低版本必须) -->
|
||||||
<uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE"
|
<uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="32"
|
android:maxSdkVersion="32"
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ fun ImagePicker(
|
||||||
val tempImageUri = remember { mutableStateOf<Uri?>(null) }
|
val tempImageUri = remember { mutableStateOf<Uri?>(null) }
|
||||||
|
|
||||||
// 新增选择对话框
|
// 新增选择对话框
|
||||||
var showChoiceDialog by remember { mutableStateOf(false) }
|
//var showChoiceDialog by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
// 新增大图预览状态
|
// 新增大图预览状态
|
||||||
var previewImageUri by remember { mutableStateOf<Uri?>(null) }
|
var previewImageUri by remember { mutableStateOf<Uri?>(null) }
|
||||||
|
|
@ -130,7 +130,7 @@ fun ImagePicker(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (showChoiceDialog) {
|
if (showChoiceDialog) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = { showChoiceDialog = false },
|
onDismissRequest = { showChoiceDialog = false },
|
||||||
|
|
@ -160,6 +160,7 @@ fun ImagePicker(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// 全屏大图对话框
|
// 全屏大图对话框
|
||||||
previewImageUri?.let { uri ->
|
previewImageUri?.let { uri ->
|
||||||
|
|
@ -217,7 +218,10 @@ fun ImagePicker(
|
||||||
AddSingleButton(
|
AddSingleButton(
|
||||||
imageHeight = imageHeight,
|
imageHeight = imageHeight,
|
||||||
aspectRatio = aspectRatio,
|
aspectRatio = aspectRatio,
|
||||||
onClick = { showChoiceDialog = true },
|
onClick = {
|
||||||
|
galleryLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
||||||
|
//showChoiceDialog = true
|
||||||
|
},
|
||||||
label = addButtonName,
|
label = addButtonName,
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -226,7 +230,10 @@ fun ImagePicker(
|
||||||
contentAlignment = Alignment.BottomCenter
|
contentAlignment = Alignment.BottomCenter
|
||||||
) {
|
) {
|
||||||
AddButton(
|
AddButton(
|
||||||
onClick = { showChoiceDialog = true },
|
onClick = {
|
||||||
|
galleryLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
|
||||||
|
//showChoiceDialog = true
|
||||||
|
},
|
||||||
label = addButtonName,
|
label = addButtonName,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ object Constants {
|
||||||
const val RELEASE_BASE_URL = "https://jitutu.batiao8.com" //release
|
const val RELEASE_BASE_URL = "https://jitutu.batiao8.com" //release
|
||||||
const val DEBUG_BASE_URL = "https://jitutu.batiao8.com" //debug
|
const val DEBUG_BASE_URL = "https://jitutu.batiao8.com" //debug
|
||||||
const val LOG_REQUEST = "RabbitRequest"
|
const val LOG_REQUEST = "RabbitRequest"
|
||||||
const val agreementUrl = "https://jitutu.batiao8.com/static/policy-jietutu/user.html" //用户协议
|
const val agreementUrl = "https://jitutu.batiao8.com/static/policy-jietutu/user_android.html" //用户协议
|
||||||
const val privacyUrl = "https://jitutu.batiao8.com/static/policy-jietutu/provacy.html"//隐私政策
|
const val privacyUrl = "https://jitutu.batiao8.com/static/policy-jietutu/provacy.html"//隐私政策
|
||||||
|
|
||||||
//const val getuiAppId = "40qbPjPkYs7TnVAYCX0Ig6"//个推appid (gradle.properties)
|
//const val getuiAppId = "40qbPjPkYs7TnVAYCX0Ig6"//个推appid (gradle.properties)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue