2

what is the difference between

@android:id/hello

and

@id/hello

I ask this, cause apparently we MUST use @android:id/list in the Class when we want to extend ListActivity.

grgvn
  • 1,309
  • 1
  • 12
  • 25
  • You don't HAVE to use "@android:id/list". It's recommended and convention, but not 100% necessary. I was "forced" (more like curious) to implement a ListView without the default Android ID when a partner of mine messed with the code in such a significant way that to rollback the changes would have been worse than going along with it. `` – Jon Jun 06 '11 at 13:24
  • please check below link http://stackoverflow.com/questions/4355614/what-is-difference-between-id-androidlist-and-id-list – Nikhil Jun 06 '11 at 13:21

2 Answers2

2

@android:id/hello is the default ID as set by Android (except that I don't think they have a hello set).

@id/hello would be an ID set specific to your application.

Jon
  • 2,502
  • 4
  • 21
  • 23
1

The @android:* identifiers refer to pre-defined identifiers in the SDK. Those are the only identifiers known to the framework (like ListActivity). Identifiers like @id/list refer to your app's resources.

Ted Hopp
  • 232,168
  • 48
  • 399
  • 521