2010-08-19 6 views
0

В значениях/colors.xml, я ставлю:Android - Main.xml не распознает мои значения цвета ...?

<?xml version="1.0" encoding="utf-8"?> 
<resources xmlns:android="http://schemas.android.com/apk/res/android"> 
<color name="blank">#f0f0f0</color> 
</resources> 

В макете/main.xml, я ставлю:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@android:color/white" 
> 
<TextView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:textColor="@colors/blank" 
/> 
</LinearLayout> 

И я получил ошибку:

No resource found that matches the given name (at 'textColor' with value '@colors/blank') 

ответ

2

Это @ цвет/пробел, а не @ colors/blank. Нет «нет» :)

Смежные вопросы