Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
世博会图像采集器android没有选择按钮_Android_Expo_React Native Android_Android Image_React Native Image Picker - Fatal编程技术网

世博会图像采集器android没有选择按钮

世博会图像采集器android没有选择按钮,android,expo,react-native-android,android-image,react-native-image-picker,Android,Expo,React Native Android,Android Image,React Native Image Picker,我使用的是react native和expo,expo图像选择器在iOs上运行良好,在android上运行良好,但有一个例外。当用户从多媒体资料中提取图片时,没有“确定”、“选择”或“完成”按钮 用户必须单击裁剪按钮才能接受图像。这是典型的吗?我觉得这将是一个混乱和糟糕的用户体验 const chooseImage = async (useCamera, index) => { if (!(await checkPermission(useCamera))) { Alert.alert

我使用的是react native和expo,expo图像选择器在iOs上运行良好,在android上运行良好,但有一个例外。当用户从多媒体资料中提取图片时,没有“确定”、“选择”或“完成”按钮

用户必须单击裁剪按钮才能接受图像。这是典型的吗?我觉得这将是一个混乱和糟糕的用户体验

const chooseImage = async (useCamera, index) => {
if (!(await checkPermission(useCamera))) {
  Alert.alert(
    "Permission missing.",
    "Camera permission is required to take image."
  );
  return;
}
const method = useCamera ? "launchCameraAsync" : "launchImageLibraryAsync";
const result = await ImagePicker[method]({
  allowsEditing: true,
  base64: false,
  aspect: [3, 4],
});
if (!result.cancelled) {
  // upload image and retrieve image url
  const {height, width, type, uri} = result;
  profile.images[index] = uri;
  if (uri != null) {
    setProfile(profile);
  }
  setChangedValue("images");
}
};
更新
发现如果删除编辑功能allowsEditing,我可以选择照片。但是我希望用户能够编辑,所以我很好奇为什么编辑没有“OK”按钮?

我发现“裁剪”按钮就是“完成”按钮

没有其他方法来实现图像的选择,因此这只是图像选择器的一个设计方面