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.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
C# MailKit 邮件发送附件下载demo (234个子文件)
FrequentlyAskedQuestions.aml 26KB
FrequentlyAskedQuestions.aml 12KB
WorkingWithMessages.aml 12KB
WorkingWithMessages.aml 11KB
WorkingWithSMime.aml 9KB
Introduction.aml 9KB
WorkingWithSMime.aml 9KB
WorkingWithPGP.aml 6KB
WorkingWithPGP.aml 6KB
Introduction.aml 6KB
GettingStarted.aml 4KB
CreatingMessages.aml 4KB
CreatingMessages.aml 4KB
GettingStarted.aml 4KB
ParsingMessages.aml 2KB
ParsingMessages.aml 2KB
License.aml 2KB
License.aml 2KB
ViewMessageLayout.axml 2KB
LoginLayout.axml 2KB
MessageListItemLayout.axml 996B
FoldersLayout.axml 550B
MessagesLayout.axml 550B
Main.axml 444B
Main.axml 430B
DesignTimeResolveAssemblyReferencesInput.cache 7KB
App.config 768B
ImapClientDemo.vshost.exe.config 768B
ImapClientDemo.exe.config 768B
app.config 747B
app.config 658B
app.config 658B
app.config 424B
packages.config 222B
packages.config 218B
packages.config 204B
packages.config 204B
App.config 187B
app.config 144B
MailKitConsoleApplication.exe.config 144B
packages.config 143B
packages.config 142B
packages.config 135B
ContentLayout.content 737B
ContentLayout.content 737B
Pop3Operation.cs 11KB
Program.cs 10KB
ImapIdleExample.cs 9KB
Pop3Examples.cs 9KB
SmtpExamples.cs 9KB
MessageViewWindow.cs 8KB
LoginWindow.Designer.cs 8KB
MainWindow.cs 7KB
MimeVisitorExamples.cs 7KB
FolderTreeView.cs 6KB
MessageReaderViewController.cs 6KB
SmtpOperation.cs 6KB
SMimeExamples.cs 6KB
SMimeExamples.cs 6KB
MainActivity.cs 6KB
ImapExamples.cs 5KB
MessageListActivity.cs 4KB
LoginViewController.cs 4KB
FoldersActivity.cs 4KB
OpenPGPExamples.cs 4KB
OpenPGPExamples.cs 4KB
MessageList.cs 4KB
Resource.designer.cs 4KB
LoginActivity.cs 4KB
MainWindow.Designer.cs 4KB
MessageListViewController.cs 3KB
Program.cs 3KB
FoldersViewController.cs 3KB
AppDelegate.cs 3KB
AppDelegate.cs 3KB
LoginWindow.cs 2KB
Resources.Designer.cs 2KB
Resources.Designer.cs 2KB
BodyBuilder.cs 2KB
MessageViewActivity.cs 2KB
AssemblyInfo.cs 2KB
Program.cs 2KB
MultipartRelatedUrlCache.cs 2KB
MultipartRelatedUrlCache.cs 2KB
Resource.designer.cs 2KB
MessageViewController.cs 2KB
MultipartRelatedWebViewClient.cs 2KB
Main.cs 2KB
MessageViewWindow.Designer.cs 2KB
MainActivity.cs 2KB
Mail.cs 2KB
Main.cs 2KB
AssemblyInfo.cs 1KB
AssemblyInfo.cs 1KB
MultipartFormDataExamples.cs 1KB
MultipartFormDataExample.cs 1KB
MultipartFormDataExamples.cs 1KB
MultipartFormDataExample.cs 1KB
AssemblyInfo.cs 1KB
BodyBuilder.cs 1KB
共 234 条
- 1
- 2
- 3
waterzhz
- 粉丝: 3
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页