如何在微调项之间显示分隔线? [英] How to show divider between spinner items?

查看:32
本文介绍了如何在微调项之间显示分隔线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用具有分隔线的列表视图和扩展视图,我可以设置它们,但在微调器上它看起来好像项目之间没有分隔线.

I using listviews and expandedviews that has dividers and I can set them but on spinner its looks like it is no divider between items.

有人知道如何解决这个问题吗?

Someone that has a idea of how to fix this?

推荐答案

对于遇到同样问题的人,我几乎放弃了,我知道如何获得分隔符.

For people with same problem i after almost gived up i got an idea of how to get the divider.

我在每个项目的自定义布局底部添加了分隔线

I added the divider line at the bottom of my custom layout for each item

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout android:id="@+id/RelativeLayout01"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android" style="@style/ListItem2">

    <TextView android:id="@+id/Text" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_alignParentLeft="true"
        style="@style/SpinnerView_Text" android:paddingLeft="10dip" />

    <ImageView android:id="@+id/icon" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:src="@drawable/arrowright"
        android:layout_alignParentRight="true" android:layout_centerInParent="true"
        android:layout_marginRight="20dip" />

</RelativeLayout>

<ImageView android:id="@+id/Divider1" android:layout_width="fill_parent"
    android:layout_height="1dip" style="@style/Divider"></ImageView>

这篇关于如何在微调项之间显示分隔线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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