Riya Sehgal

Riya Sehgal

  • NA
  • 616
  • 160.5k

Color property in Android

Aug 2 2011 12:33 AM
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)