最顶部和最底部的水平分隔线未显示在ListView中 [英] Top-most and Bottom-most Horizontal Divider does not show up in ListView

查看:64
本文介绍了最顶部和最底部的水平分隔线未显示在ListView中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ListView.但是,最顶部和最底部的水平条不会出现.为什么?我正在使用这个:

I am using a ListView. But the top-most and bottom-most horizontal bar does not show up. Why? I am using this:

android:divider="@android:drawable/divider_horizontal_bright"

推荐答案

您是否研究过在ListView上设置android:headerDividersEnabledandroid:footerDividersEnabled?

Have you looked into setting android:headerDividersEnabled and android:footerDividersEnabled on the ListView?

此外,如果您在drawDivider, rel ="noreferrer"> Android开源存储库,您将可以找到更多线索.

Also, if you look for drawDivider in platform/frameworks/base/+/master/core/java/android/widger/ListView.java in the Android open source repository, you'll be able to find some more clues.

这篇关于最顶部和最底部的水平分隔线未显示在ListView中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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