-9

Differences between?

  • @+id/mywidget
  • @id/mywidget
  • @android:id/mywidget

3 Answers3

4

  1. you are declaring a new id inside class R(from your app)
  2. you are referencing and id inside class R (from your app)
  3. you are referencing and id inside class R (from the android.R)
Blackbelt
  • 156,034
  • 29
  • 297
  • 305
1
@+id/mywidget

Adds the id to R.java

@id/mywidget

References an existing id

@android:id/mywidget

References an id that exists in android.R.java, e.g. resources that are already provided by the framework

fweigl
  • 21,278
  • 20
  • 114
  • 205
0
  1. @+id/mywidget - you are defining new id mywidget
  2. @id/mywidget - you are referencing already defined id mywidget
  3. you are referencing an id mywidget from Android
Melquiades
  • 8,496
  • 1
  • 31
  • 46