开发者

Android XML. What is the purpose of the star in the ID string?

In some sources I see such declarations

<item
    android:id="@+id/menu_display_groups"
    android:icon="@*android:drawable/ic_menu_allfriends"
    android:title="@string/menu_displayGroup" />

Notice the *

@*android:

It seems to give access to interna开发者_C百科l resources. But would like to know for sure.

Also curious, if it is safe to build application with such declarations using Android 2.2 SDK, and run it on 1.5.


You are correct, it gives access to internal resources for platform apps. It is NOT safe to build apps with such declarations unless you are building a bundled app within a full system image.

Internal resources can (and do) change/get removed not only from platform version to platform version, but also from device to device or device version to device version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜