Android的底部导航栏重叠微调。设置微调下拉高度/保证金 [英] Android bottom navigation bar overlapping Spinner. Set Spinner dropdown height / margin

查看:714
本文介绍了Android的底部导航栏重叠微调。设置微调下拉高度/保证金的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个有趣的问题,我偶然发现,而在Android蜂巢项目。正如你可以在下面的图片中看到,而在对话框中展开一个微调,在底部的导航栏上重叠了。因此,在底部的元件不能被选定。

There is an interesting issue I stumbled upon while working on an Android Honeycomb project. As you can see in the image below, while expanding a Spinner in a dialog, the navigation bar at the bottom overlaps it. Thus, the element at the bottom can not be selected.

为了解决这个问题我使用 Android的尝试:fitsSystemWindows =真正的中的微调部件。它不起作用。我也注意到,我们有下拉宽度的XML属性,的android:dropDownWidth ,但没有身高

In order to fix this I tried using android:fitsSystemWindows="true" in the Spinner widget. It did not work. Also I noticed that we have an XML Attribute for dropdown width, android:dropDownWidth, but none for height.

下面是3个纱厂的XML布局:

Here is the XMl layout for the 3 Spinners:

    <TableRow>

        <Spinner
            android:id="@+id/order_dialog_category_code_Spinner"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:fitsSystemWindows="true" />

        <Spinner
            android:id="@+id/order_dialog_packing_code_Spinner"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:fitsSystemWindows="true" />

        <Spinner
            android:id="@+id/order_dialog_product_Spinner"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:fitsSystemWindows="true" />
    </TableRow>

我将继续测试,并希望能尽快找到一个解决方案,但它是一个有趣的问题,它当之无愧地被公布。

I will keep testing and hope to find a solution soon but it is an interesting issue and it deserved to be posted.

我没有在Android的ICS的考验,但我认为它可能起到相同的。

I did not test in Android ICS yet but I think it might act the same.

修改

我使用安卓有些管理的修复程序。它没有解决这个问题,但现在我已经在对话框视图中的保证金,以及和我不希望这样。

I managed somewhat of a fix by using the android:layout_marginBottom attribute for the Spinners. It did solve the issue but now I have the margin in the dialog view as well and I don't want that.

有谁知道如何设置保证金只为下拉资源?

Does anyone know how to set the margin only for the dropdown resource?

推荐答案

一些调查研究后,似乎你不能操作Spinner下拉的高度,或任何其他的它的布局属性。

After some more research it seems that you can not manipulate the height of the Spinner dropdown, or any other of it's layout attributes.

这是因为下拉实际上不能从微调查看accesed一个弹出式对话框。

This is because the dropdown is actually a popup dialog that cannot be accesed from the Spinner View.

这答案规定明确: http://stackoverflow.com/a/1918655/529138

所以,接缝,我不得不使用的android:layout_marginBottom 中的问题指定

So it seams that I have to use android:layout_marginBottom as specified in the question.

这篇关于Android的底部导航栏重叠微调。设置微调下拉高度/保证金的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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