When parsing XML resources, Android ignores XML attributes that aren’t supported by the current device. So you can safely use XML attributes that are only supported by newer versions without worrying about older versions breaking when they encounter that code.
转载于:https://my.oschina.net/xiaoxiaost/blog/126569
本文介绍了Android系统在解析XML资源时对于不同版本设备的兼容性处理方式。当使用某些仅在较新Android版本中才支持的XML属性时,开发者不必担心这些属性在旧版本设备上会导致应用崩溃。Android系统会自动忽略不受支持的属性。

2万+

被折叠的 条评论
为什么被折叠?



