简体   繁体   English

如何使用 Expo 在 React Native 中自定义图像选择器,如 Facebook?

[英]How to custom Image Picker like Facebook in React Native with Expo?

I want to customize Image Picker like Facebook does (image below) in React Native.我想像 Facebook 在 React Native 中那样自定义图像选择器(下图)。 But I cannot find any articles about this.但是我找不到任何关于此的文章。

在此处输入图像描述

I have used expo-image-picker but it just shows Photo Library for picking images.我使用过 expo-image-picker 但它只显示用于挑选图像的照片库。 But I just want to load all images from Photo Library and have my custom header (something like Facebook app).但我只想加载照片库中的所有图像并拥有我的自定义 header(类似于 Facebook 应用程序)。

Does anyone know how to customize Image Picker?有谁知道如何自定义图像选择器? Please give me an instruction.请给我一个指示。 Thank a lot.非常感谢。

Check out libraries like react-native-cameraroll which could help with that.查看像react-native-cameraroll这样的库,它可以帮助解决这个问题。 They allow you to read the images from cameraroll and you can decide what to do with it afterwards (eg. rendering into your custom UI)它们允许您从 cameroll 中读取图像,然后您可以决定如何处理它(例如渲染到您的自定义 UI 中)

If I'm not mistaken, expo-image-picker just pulls up the native system UI that handles image picking, just like the modal that shows up when you change an appleID profile picture in settings.如果我没记错的话,expo-image-picker 只是调出处理图像选取的本机系统 UI,就像您在设置中更改 appleID 个人资料图片时显示的模态一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 expo-image-picker 库在 React Native 中上传自定义尺寸的图像? - How do I upload an image of custom dimensions in React Native, using the expo-image-picker library? 如何在 React Native 中使用 expo-image-picker 上传图像 - How to upload an image using expo-image-picker in react native 使用 react native 和 expo 创建自定义日期选择器 - Create a custom date picker with react native and expo React Native 中的 Expo-Image-Picker - Expo-Image-Picker in React Native Expo React Native Image-picker - Expo react native Image-picker React Native Expo 如何使用 expo 图像选择器将图像上传到 Firebase - React Native Expo How to upload an image to Firebase using expo Image picker Expo React Native,如何选择从 expo 图像选择器获得的默认本地图像或用户图像 - Expo React Native, How to pick default local images or user image obtained from expo image picker react-native-image-crop-picker无法在Expo中运行React Native - react-native-image-crop-picker is not Working React Native in Expo 如何在 android 中设置 react native expo 选择器的样式 - how to style react native expo picker in android 反应原生:图像正在使用 expo-image-picker 上传,但不使用 react-native-image-picker 上传 - react native : image is uploading using expo-image-picker but not uploading using react-native-image-picker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM