xamarin Android应用程序:如何让我的项目的资源文件夹 [英] xamarin android application: how to get the Resources folder of my project

查看:2174
本文介绍了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卡上的目录,看到这个帖子:
<一href=\"http://stackoverflow.com/questions/7887078/android-saving-file-to-external-storage/7887114#7887114\">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指南应该告诉你一切你需要知道:
<一href=\"http://docs.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/\" rel=\"nofollow\">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/

这篇关于xamarin Android应用程序:如何让我的项目的资源文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆