Tag: divider

删除Android ListView的底部分隔线

我有一个固定的高度ListView 。 它有列表项之间的分隔,但它也显示最后列表项后的分隔符。 有没有办法在ListView的最后一个项目之后不显示分隔符?

如何添加(垂直)分隔线到水平LinearLayout?

我正在尝试添加一个水平线性布局的分频器,但我无处可去。 分频器只是不显示。 我是Android的新手。 这是我的布局XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/llTopBar" android:orientation="horizontal" android:divider="#00ff00" android:dividerPadding="22dip" android:showDividers="middle" > <Button android:layout_width="wrap_content" android:layout_height="match_parent" android:text="asdf" /> <Button android:layout_width="wrap_content" android:layout_height="match_parent" android:text="asdf" /> </LinearLayout> </RelativeLayout>

Android ListView Divider

我有这个代码: <ListView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/cashItemsList" android:cacheColorHint="#00000000" android:divider="@drawable/list_divider"></ListView> 其中@ drawable / list_divide是: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:width="1dp" android:color="#8F8F8F" android:dashWidth="1dp" android:dashGap="1dp" /> </shape> 但我没有看到任何分隔线。 帮帮我?

如何在RecyclerView中的项目之间添加分隔符和空格?

这是一个如何在ListView类中使用divider和dividerHeight参数完成的例子 : <ListView android:id="@+id/activity_home_list_view" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@android:color/transparent" android:dividerHeight="8dp"/> 但是,在RecyclerView类中我没有看到这种可能性。 <android.support.v7.widget.RecyclerView android:id="@+id/activity_home_recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical"/> 在这种情况下,定义边距和/或直接将自定义分隔视图添加到列表项的布局是否可行,还是有更好的方法来实现我的目标?