Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.axml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
没有合适的资源?快使用搜索试试~ 我知道了~
xamarin android使用zxing扫描二维码例子
共34个文件
stamp:7个
cs:6个
xml:6个
4星 · 超过85%的资源 需积分: 45 123 下载量 152 浏览量
2017-07-07
01:02:22
上传
评论 4
收藏 26KB RAR 举报
温馨提示
xamarin android中使用ZXing.Net.Mobile扫描二维码,原文地址:http://blog.csdn.net/kebi007/article/details/74620978
资源推荐
资源详情
资源评论
收起资源包目录
ZxingMobile.rar (34个子文件)
ZxingMobile
GettingStarted.Xamarin 160B
bin
Debug
packages.config 333B
obj
Debug
res
drawable
icon.png 4KB
values
strings.xml 126B
layout
main.xml 512B
android
zxingmobile
zxingmobile
R.java 1003B
TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs 0B
__library_projects__
Xamarin.Android.Support.v4.stamp 0B
System.Runtime.stamp 0B
Xamarin.Android.Support.v4
library_project_imports
System.Runtime
library_project_imports
ZXing.Net.Mobile.Core
library_project_imports
zxing.portable
library_project_imports
ZXingNetMobile.stamp 0B
Java.Interop.stamp 0B
zxing.portable.stamp 0B
ZXingNetMobile
library_project_imports
bin
res
layout
zxingscanneractivitylayout.xml 397B
zxingscannerfragmentlayout.xml 145B
assets
__res_name_case_map.txt 156B
java
ZXing.Net.Mobile.Core.stamp 0B
Java.Interop
library_project_imports
FastAndroidCamera.stamp 0B
FastAndroidCamera
library_project_imports
bin
res
assets
java
sdks.cache 1KB
DesignTimeResolveAssemblyReferencesInput.cache 24KB
TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs 0B
libraryimports.cache 120B
libraryprojectimports.cache 1KB
TempPE
TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs 0B
R.cs.flag 0B
Assets
AboutAssets.txt 620B
Resources
Resource.Designer.cs 3KB
drawable
Icon.png 4KB
values
Strings.xml 182B
AboutResources.txt 2KB
layout
Main.axml 644B
MainActivity.cs 2KB
ZxingMobile.csproj 5KB
Properties
AssemblyInfo.cs 1KB
AndroidManifest.xml 311B
共 34 条
- 1
dotnet全栈开发
- 粉丝: 2w+
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页