Android Framewrork资源类型有哪些?

1. Google Framework res

 

frameworks/base/core/res/res/values

<public type="attr" name="theme" id="0x01010000" />
<public type="id" name="background" id="0x01020000" />
<public type="style" name="Animation" id="0x01030000" />
<public type="string" name="cancel" id="0x01040000" />
<public type="dimen" name="app_icon_size" id="0x01050000" />
<public type="color" name="darker_gray" id="0x01060000" />
<public type="array" name="emailAddressTypes" id="0x01070000" />
<public type="drawable" name="alert_dark_frame" id="0x01080000" />
<public type="layout" name="activity_list_item" id="0x01090000" />
<public type="anim" name="fade_in" id="0x010a0000" />
<public type="animator" name="fade_in" id="0x010b0000" />
<public type="interpolator" name="accelerate_quad" id="0x010c0000" />
<public type="mipmap" name="sym_def_app_icon" id="0x010d0000" />
<public type="integer" name="config_shortAnimTime" id="0x010e0000" />
<public type="transition" name="no_transition" id="0x010f0000" />
<public type="raw" name="loaderror" id="0x01100000" />

2. mtk framework res

vendor/mediatek/proprietary/frameworks/base/res/res/values

<public type="attr" name="promptHorzOffset" id="0x08010000" />  
<public type="drawable" name="ic_clock" id="0x08020001" />
<public type="raw" name="gemini_sac" id="0x08030000" />
<public type="array" name="bootup_mode" id="0x08040000" />
<public type="string" name="Pin2Mmi" id="0x08050009" />
<public type="color" name="theme_slicer_backgroud_color" id="0x08060000" />
<public type="style" name="ImageSwitch" id="0x080f0000" />

 

values目录下创建public.xml,public.xml对id的类型区分比较严 格,attr必须是0x0x010000开头,drawable必须是0x0x020000开头,其他类型好像就没有限制,直接依次 0x0x030000、0x0x040000开始即可。否则,编译过程中会出现segmentation fault错误

posted @ 2017-07-14 10:55  行走的思想  阅读(407)  评论(0编辑  收藏  举报