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
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer