The differences between @+id and @android

@+id/foo means you are creating an id named foo in the namespace of your application. You can refer to it using @id/foo.

@android:id/foo means you are referring to an id defined in the android namespace. This namespace is the namespace of the framework. In this case, you need to use @android:id/list and @android:id/empty because these are the id the framework expects to find (the framework knows only about the ids in the android namespace.)

The XML layout editor doesn't know how you will use your layout and generates by default ids that are in your application namespace. So the XML format is correct, it's not a compile time error, but really a runtime error.

http://groups.google.com/group/android-developers/browse_thread/thread/dc8023b221351aa7?pli=1

你可能感兴趣的:(android)