xamarin Android应用程序:如何让我的项目的资源文件夹

xamarin Android应用程序:如何让我的项目的资源文件夹

问题描述:

如何才能让我喜欢的项目资源/绘制对象的资源文件夹
我需要这个存储图像的应用程序,供以后使用。

How can i get the Resources folder of my project like Resources/Drawable i need this to store Images on the app for later use

我trye​​d:

var Path = (System.Environment.CurrentDirectory + "/Resources/Drawable");

不过,我没有工作,因为我在的.cs(类文件)使用此地图中的多数民众赞成确定
APP_ code我怎样才能得到资源地图,我认为还有一个更简单的方法
得到这个。

But i didnt work because i use this in a .cs (Class File) thats defined in the map App_Code how can i get the Resources map i think there is an much easier way to get this.

如果你想保存你从什么地方运行时,你可能不应该使用的资源目录中获取图像。相反,你应该将它们保存在SD卡上的目录,看到这个帖子:
Android文件保存到外部存储

If you are trying to store images you get from somewhere the runtime, you probably shouldn't be using the resources directory. Instead, you should save them in a directory on the SD card, see this post: Android saving file to external storage

否则,如果你只是想访问,同时建立你的应用程序,你已经列入资源,这Xamarin指南应该告诉你一切你需要知道:
http://docs.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/

Otherwise, if you're just trying to access resources that you've included while building your application, this Xamarin guide should tell you everything you need to know: http://docs.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/