开发者

Android: how do i make a View's background invisible?

I am working with a ListActivity, and I'm trying to add images/backgrounds, ext to make everything look nice. However i have run into a little snag.

The layout for the activity defines a background image, but the list items are not always transparent, and therefore cover up the background. If i am scrolling, or have otherwise touched a list item, the list item's backgrounds are transparent (as desired) but if i touch anything else they get a black background which covers up the Activi开发者_如何学编程ty's background.

Is there some value i can set like, android:background="invisible" or something else to fix this problem?

TIA


Found my answer on another question

I set these properties in the ListView and it worked great

android:background="#00000000" android:cacheColorHint="#00000000"


For a detailed explanation, check here: http://developer.android.com/resources/articles/listview-backgrounds.html

Basically, set android:cacheColorHint="#00000000" on the ListView. Problem solved. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜