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.xml),
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-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
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
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
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 Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
没有合适的资源?快使用搜索试试~ 我知道了~
多点触控&手势操作 一个最最基础的图形程序,圆可以拖动,两点触控是删除圆,3点触控是添加一个圆(程序源码).rar
共15个文件
cs:5个
xml:2个
txt:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 68 浏览量
2023-03-17
08:25:08
上传
评论
收藏 1.9MB RAR 举报
温馨提示
免责声明:资料部分来源于合法的互联网渠道收集和整理,部分自己学习积累成果,供大家学习参考与交流。收取的费用仅用于收集和整理资料耗费时间的酬劳。 本人尊重原创作者或出版方,资料版权归原作者或出版方所有,本人不对所涉及的版权问题或内容负法律责任。如有侵权,请举报或通知本人删除。
资源推荐
资源详情
资源评论
收起资源包目录
多点触控&手势操作 一个最最基础的图形程序,圆可以拖动,两点触控是删除圆,3点触控是添加一个圆(程序源码).rar (15个子文件)
Circle
Circle
Assets
AboutAssets.txt 620B
bin
Release
MyCircle.MyCircle-Signed.apk 3.49MB
Properties
AssemblyInfo.cs 1KB
AndroidManifest.xml 222B
Resources
Resource.Designer.cs 2KB
AboutResources.txt 2KB
Drawable
Icon.png 4KB
Layout
Main.axml 976B
View1.cs 4KB
Values
Strings.xml 179B
Circle.cs 2KB
Circle.csproj 4KB
Activity1.cs 1KB
Circle.v11.suo 33KB
Circle.sln 1KB
共 15 条
- 1
资源评论
金枝玉叶9
- 粉丝: 196
- 资源: 7637
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功