如何在导航抽屉中的某些元素下方添加水平线。例如,如果我的导航抽屉具有以下元素;主页,开始,休息,学习,步行,自行车,狗,猫。
如果我想在“ Break”下方放置一条水平线,在“ Bike”和“ Cat”下方放置另一条水平线,我该怎么做。
是否有关于如何执行此操作的教程或我可以参考的网站。
似乎您正在导航抽屉中使用ListView / GridView。您可以使用除法器属性放一个除法器。
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/cashItemsList"
android:cacheColorHint="#00000000"
android:divider="@drawable/list_divider"></ListView>
list_divider的xml应该是这样的
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:height="1dp"
android:color="#00000000"
android:dashWidth="1dp"
android:dashGap="1dp" />
</shape>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句