In a Listview two different color can be set for odd row and even row.By creating a custom adapter  and by extending the ArrayAdapter and overriding  the getView method it can be handled. And inside the getView method based on the condition   the color of the text  can be changed using  setBackgroundcolor attribute. let see

Set Button background

Monday, 05 August 2013 by

A button consists of text or an icon (or both text and an icon) that communicates what action occurs when the user touches it.To customize individual buttons with a different background, specify the android:background attribute with a drawable or color resource. This code is for setting background image of a button and set background color

TOP