什么属性控制微调下拉背景是什么? [英] What property controls Spinner dropdown background?

查看:117
本文介绍了什么属性控制微调下拉背景是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个生成创建一个自定义主题。它有一个纱厂自定义样式,我不喜欢。我想改变背景绘制,但我似乎无法找出哪些属性控制这一点。

I have a custom theme created with this generator. It has a custom style for Spinners which I don't like. I want to change the background drawable but I can't seem to figure out which property controls this.

这是什么主题的版本看起来像

This is what the themed version looks like

这是它的外观采用Holo.Light主题时等。

And here is what it will look like when using the Holo.Light theme.

注意围绕在第一个(主题)图像下拉列表中选择深灰色线条。这是我想摆脱的东西。什么属性控制呢?我希望他们能够匹配默认值。

Notice the dark gray lines around the dropdown list in the first (themed) image. This is what I want to get rid of. What property controls this? I want them to match the default.

此外,什么控制的下拉列表中的垂直aligment?正如你所看到的,它与第一个图像的微调重叠(在这行是不可见的,因为它是在第二幅图像)。

Also, what controls the vertical aligment of the dropdown list? As you can see, it is overlapping with the Spinner in the first image (the line under it isn't visible as it is in the second image).

推荐答案

你想要的属性是的android:popupBackground 微调元素。

The attribute you want is android:popupBackground on the Spinner element.

如果你仔细观察,在弹出全息重叠也微调了一些,但有一堆填充的阴影,所以它看起来不错。

If you look closely, the holo popup also overlaps the spinner some, but there is a bunch of padding for the drop shadow, so it looks good.

不过,您可以使用的android:dropDownVerticalOffset 微调元素上进行调整

However, you can use android:dropDownVerticalOffset on the Spinner element to adjust it.

这篇关于什么属性控制微调下拉背景是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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