Android:Spinner下拉透明

时间:2013-12-10 10:02:08

标签: android android-layout spinner android-spinner android-custom-view

开发一个我正在使用微调器的应用程序。现在我想透明微调器的下拉列表的背景。

enter image description here

在上面的屏幕中,我想透明A,B,C ......的背景。

我想应用透明背景,以便可以看到背景。 我试过并将自定义适配器中的透明图像应用于微调器下拉列表,它看起来如下:

enter image description here

我想删除下拉图片中背景的下拉列表的白色背景。

enter image description here

3 个答案:

答案 0 :(得分:1)

Add this transperency code before your color code ex for 100% :- #FF7c7c7c
Trasparent color codes

100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00

答案 1 :(得分:0)

为了您的关注,您可以尝试为同一个人提供透明背景......

代表:

android:background="#00424242"

//#00424242 - 这将代表透明色

答案 2 :(得分:0)

您自己的文本视图,并将此文本视图应用于您的适配器。

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tv_spinner_entry"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:background="your color"
    android:padding="@dimen/padding_all"
    android:textColor="@android:color/black"
    android:textSize="@dimen/text_size" />
相关问题