When should i use @android:id/?

前端 未结 3 1250
无人及你
无人及你 2021-01-16 08:12

I\'ve found some code examples with the @android:id/xyz attribute set instead of @+id/xyz.
When and why is it necessary to use Android ids in

3条回答
  •  [愿得一人]
    2021-01-16 08:56

    @android is used to access the default resources of Android . For example see this:

    android:background="@android:color/transparent"
    

    Using + sign means this resource must be added in R.java file while not using + sign means the resource already exist in R.java.

提交回复
热议问题