I have a ListActivity with a ListView and everything works great; however I am trying to set a background image and the image is appearing in each row and making the row very tall.
How do I make the background for that view so the rows don't pick up the image?
In onCreate() of your ListActivity, call
getListView().setCacheColorHint(0);
getListView().setBackgroundResource(R.drawable.backgroundresource);
Without the .setCacheColorHint(0) the background will flash to the original background color every time you scroll. With it added the background is a constant. (Thanks Matt it fixed that issue for me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With