更改微调器背景会生成深色边框 [英] Changing Spinner background generates dark colored border

查看:106
本文介绍了更改微调器背景会生成深色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用一个简单的微调器.当我滚动微调框时,围绕微调框下拉菜单的阴影开始颜色变深.

Using a simple spinner. When I scroll the spinner the shadow around spinner dropdown starts growing darker in color.

我设法解决了这个问题,但是

I managed to fix the issue but

如果有人能解释我为什么会这样,我将不胜感激发生了吗?

I will appreciate if someone could explain me why was this happening?

<Spinner
            android:id="@id/drop_list_1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="@android:color/transparent"
            android:dropDownSelector="@android:drawable/list_selector_background"
            android:dropDownWidth="wrap_content"
            android:minHeight="@dimen/min_header_height"
            android:popupBackground="#FFFFFF" />

推荐答案

已修复:针对低于21的Api

fixed: for Api below 21

style="@style/Widget.AppCompat.Spinner.DropDown"

如果使用api 21及更高版本

if working on api 21 and above

android:popupTheme="@style/Widget.AppCompat.Spinner.DropDown"

这篇关于更改微调器背景会生成深色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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