Alex Rivera | Logout

Android System Color Constants

Asked 2011-12-30T14:06:13.463
29

Android programming is driving me crazy. The XML or programmable ways for GUI development is making a right old dogs breakfast of the code--some stuff here, some stuff there.

My current frustration is trying to keep it all XML and I would like to set the background color of the TextView the same color as the background color of a Button without having to specify the exact color code. I would like to use a system constant, something like java.awt.SystemColor.control, but specified in XML.

Is there anyway of doing this without having to respecify a bunch of stuff? I'm looking for a solution like: android:background="{Insert constant here}".

Edit
Report

1 Answer

1

used like this : android:background="#FF00FF"

answered 2011-12-30T14:14:31.057

Your Answer