I am working on a layout XML file, and I want to set a background color for a LinearLayout. This bit, which I am now using, works perfectly:
android:background="#1a64b7"
However, I would much prefer to break that out. In my strings.xml file I have
<string name="bg_blue">#1a64b7</string>
but when I use that in the following manner:
android:background="@string/bg_blue"
it shows up great in the Graphical Layout Preview in Eclipse, but the app crashes as soon as it opens. Any ideas? Thanks a ton.
Nick