简体   繁体   English

C#Xamarin形成了如何访问设备库并为自定义库网格视图检索所有图像的方法

[英]C# Xamarin forms how to access device gallery and retrieve all images for a custom gallery grid view

On my Xamarin app I'm currently working to create an image selection view. 目前,我正在Xamarin应用程序上创建图像选择视图。 For this view I'm attempting to retreive images from the Android/iOS device and display them on the page in a selection grid. 对于此视图,我试图从Android / iOS设备检索图像并将其显示在选择网格中的页面上。

What I would like is to do is access the default device gallery to retreive references to the individual files and pass these into an array. 我想做的是访问默认设备库以检索对单个文件的引用,并将它们传递到数组中。

So far I have been using the Xamarin CrossMedia plugin to pick photos, but after reading throgh the docs I'm not seing the desired functionality provided. 到目前为止,我一直在使用Xamarin CrossMedia插件来拾取照片,但是在阅读了文档之后,我并没有掌握提供的所需功能。 I've also tried retreiving the device paths for images, but found no good way to get any further than this. 我也尝试过检索图像的设备路径,但没有找到进一步的好方法。

Eg the expected/desired result is that I can access device storage to obtain references to the images on the phone, references that I then can use to fill the custom grid cells. 例如,预期/期望结果是我可以访问设备存储以获取对电话上图像的引用,然后这些引用可以用于填充自定义网格单元。

PhotoKit framework for iOS solves this. 适用于iOS的PhotoKit框架解决了这一问题。 Closing the question, Android is still unsolved. 最后,Android仍未解决。

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

相关问题 如何在C#中的图库视图中启动批处理照片/图像 - How launch batch photos/images in gallery view in C# C#Xamarin.Android图像显示在文件管理器中,而不显示在图库中 - C# Xamarin.Android images are displayed in the file manager and not in the gallery 如何以 xamarin 形式从图库中选择图像? - How to select an image from gallery in xamarin forms? 如何以 xamarin 形式将视频保存到图库 - how to save videos to the gallery in xamarin forms Xamarin 表单如何从图库中选择图像 - Xamarin forms How to pick a Image from Gallery Windows窗体C#图片库 - Windows forms C# picture gallery Xamarin.Forms Android 在将图像保存到设备库时获取访问被拒绝异常而未在设备中启用存储权限 - Xamarin.Forms Android when save the image to device gallery getting access denied exception without enable storage permission in device 如何从 Xamarin Forms 中的图库中 select 多张图片并保存到所需的文件路径? - How to select multiple images from gallery in Xamarin Forms and save to desired file path? 如何在 iPhone 画廊中获取所有图像,而无需在 Xamarin 中询问用户 select 它们? - How to get all images in the iPhone gallery without having to ask the user to select them in Xamarin? Xamarin Android自定义画廊gridview - Xamarin Android custom gallery gridview
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM