tags:

views:

179

answers:

1

How to apply background color to listview dynamically in Android?

+3  A: 

I'm not sure what it is you want to do but one of View.setBackgroundColor(), View.setBackgroundDrawable() or View.setBackgroundResource should cover it, depending on what you want to show.

Remember, each item in a ListView is a View in its own right, so depending on how you're creating them, they may be obscuring the background you're setting for your ListView.

You may also need to disable the cache color hint to get your views to display how you want. Have a look at this post of the Android Developer's Blog for more information.

Dave Webb
thank you very much it's working
deepthi