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错误

转载于:https://www.cnblogs.com/onelikeone/p/7168960.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值