Tuesday, April 9, 2013

[android help] Change background of linear layout in android frameworks


If you want to set through xml, then you need to do as below:



android:background="@android:color/white"


in case if you decide to use android's default color code or if you have colors specified in colors.xml, then use



android:background="@colors/white"


If you want to do programmatically, then do:



linearlayout.setBackgroundColor(Color.WHITE);


.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...