Android:带背景的透明彩色 ListViews [英] Android: Transparent Colored ListViews with Background

查看:21
本文介绍了Android:带背景的透明彩色 ListViews的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怀疑我有一个列表视图,它下面有一个带有图像的背景.我想要具有透明颜色的列表,以便使用 ListViews 颜色在背景中查看图像.我曾尝试使用选择器,但它仅适用于列表视图中的选择项.也许它不是很清楚,因此为此我附上了以下显示列表视图和背景的图片:

I have a doubt I have a listview and below it there is a background with a image. I would like to have the lists with a transparent color in order to see the image in the background with the ListViews color. I have tried using a selector but it just applies to the select item i the listview. Maybe it is not very clear so for that purpose I attach the following picture where the listview and the background is shown:

如您所见,项目背景带有颜色,但图像仍然可见

As you can see the item background is with color but the image is still visible

非常感谢

推荐答案

在 ListView 中添加以下属性...

Add following property in ListView...

android:cacheColorHint="#00000000"

用于ListView的透明背景.详情请参见此处.

it is for transparent background of ListView. More detail see Here.

这篇关于Android:带背景的透明彩色 ListViews的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆