Android开发时的R.java文件中的代码,求关键的注释说明,最好详细一点,新手学习下~ 50
packagecom.example.flashlight;publicfinalclassR{publicstaticfinalclassattr{}publicsta...
package com.example.flashlight;
public final class R {
public static final class attr {
}
public static final class color {
public static final int black=0x7f060001;
public static final int white=0x7f060000;
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
public static final int toggle_off=0x7f020001;
public static final int toggle_on=0x7f020002;
public static final int toggleselector=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f090002;
public static final int textView1=0x7f090001;
public static final int toggleButton1=0x7f090000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
}
public static final class menu {
public static final int main=0x7f080000;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f070000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f070001;
}
} 展开
public final class R {
public static final class attr {
}
public static final class color {
public static final int black=0x7f060001;
public static final int white=0x7f060000;
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
public static final int toggle_off=0x7f020001;
public static final int toggle_on=0x7f020002;
public static final int toggleselector=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f090002;
public static final int textView1=0x7f090001;
public static final int toggleButton1=0x7f090000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
}
public static final class menu {
public static final int main=0x7f080000;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f070000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f070001;
}
} 展开
2个回答
展开全部
就是系统给你声明的静态变量 你在资源文件res下面的每一个文件夹中的xml文件就是一个R.java中声明的一个静态类 每一个xml文件中的变量就是该xml对应的类的一个属性常量值
这些都是系统生成的
这些都是系统生成的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-04-22
展开全部
每一个 final class 都会在 res目录下找到对应的 目录
里面定义的 static final 声明的静态变量
这些变量在对应目录下的xml文件中有所对应 打开看一下就明白了
R文件是当你编辑了res下的内容后保存时自动生成的
对应res 目录下看一下 就什么都清楚了
里面定义的 static final 声明的静态变量
这些变量在对应目录下的xml文件中有所对应 打开看一下就明白了
R文件是当你编辑了res下的内容后保存时自动生成的
对应res 目录下看一下 就什么都清楚了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询