Android的ListView的背景不涂背景、Android、ListView

2023-09-05 08:19:51 作者:flounder 挣扎

我工作的用户界面,因为我正在写一个应用程序,但我已经打了一下墙壁,不知是否还有人在那里可以给我一些建议。

I'm working on the UI for an application I'm writing but I've hit a bit of a wall and wonder if there is anyone out there can give me some advice.

我创建了一个ViewFlipper两个列表视图之间滑动。它工作得很好,到目前为止,但似乎有一个问题与绘图。

I've created a ViewFlipper to slide between two ListViews. It works well enough so far however there seems to be an issue with drawing.

的ListView中有背景,行是透明的。当我选择一个行和滑动到下一个列表时发生的行转(我认为)透明,然后在ListView背景涂一次动画停止。然而,什么是奇怪的是,下面的行空间,不要把透明。

The ListView has a background, the rows are transparent. When I select a row and the slide to the next list occurs the rows turn (I think) transparent, then the ListView background is painted once the animation stops. What is odd however is that the space below the rows do not turn transparent.

这是一个有点难以解释,所以我录制了视频, http://www.youtube。 COM /手表?ν= 8fEEf6_Dy​​Po

It's a bit hard to explain so I recorded a video, http://www.youtube.com/watch?v=8fEEf6_DyPo

如果我穿上行的背景,然后他们不要把透明。

If I put a background on the rows then they do not turn transparent.

感谢您的时间。

推荐答案

您会发现滚动时过它这样做。尝试设置安卓cacheColorHint =#00000000在你的列表视图

You'll find it does this when scrolling too. Try setting "android:cacheColorHint="#00000000" on your listview.