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 SwipeRefreshLayout入门实例
共13个文件
cs:3个
xml:2个
txt:2个
1星 需积分: 20 29 下载量 151 浏览量
2016-10-12
23:30:26
上传
评论
收藏 25KB RAR 举报
温馨提示
Xamarin android SwipeRefreshLayout做的一个下拉刷新ListView的例子,代码很简单。删除obj和bin目录体积很小啦,谢谢下载。
资源推荐
资源详情
资源评论
收起资源包目录
SwipeRefreshLayoutDemo.rar (13个子文件)
SwipeRefreshLayoutDemo
GettingStarted.Xamarin 160B
packages.config 290B
Assets
AboutAssets.txt 620B
SwipeRefreshLayoutDemo.csproj 4KB
Resources
Resource.Designer.cs 131KB
drawable
Icon.png 4KB
values
Strings.xml 193B
AboutResources.txt 2KB
layout
Main.axml 632B
MainActivity.cs 2KB
SwipeRefreshLayoutDemo.csproj.user 261B
Properties
AssemblyInfo.cs 1KB
AndroidManifest.xml 344B
共 13 条
- 1
资源评论
- netstart1882017-06-08删除obj和bin目录体积是很小啦,但是你也把Xamarin.Android.Support.v4.dll和Xamarin.Android.Support.v7.AppCompat 也删除了!!
dotnet全栈开发
- 粉丝: 2w+
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功