Android中关于颜色变量的引用

今天运行第一个android程序,在定义好一个颜色变量的时候,系统提示错误,我新建了drawable.xml资源文件,在里面定义了颜色white,但是当我在资源文件中引用android:background=drawable/white"时,系统报错了:

No source found that matches the given name (at 'background' with value '@drawable/white') 后来跟朋友询问,才知道颜色变量引用应该是这样:

"@color/white"

posted @ 2011-02-20 21:41  freeman_rain  阅读(623)  评论(0编辑  收藏  举报