1
Answer

Color property in Android

Riya Sehgal

Riya Sehgal

13y
1.6k
1
Hi All,

I suppose we can set the color property by two types in android application  that is:

  android:background="@color/yellow"
android:background="#808080ff"

My problem is that, when I am trying to set background color by "@color/yellow", it shows System.NullReferenceException: Object reference not set to an instance of an object. And if I am using "#808080ff" it works fine.
Any-body tell me what is the problem with android:background="@color/yellow" type.....?

Answers (1)