android列表底部不显示不出来,Android列表中没有显示顶部和底部的分隔符

按照我的理解,列表视图中定义的分隔符也应该出现在列表的顶部和底部,也就是在第一个项目之上和最后一个项目之上。

由于某些原因,它们不会出现在我的列表视图中:

android:id="@+id/mainLayout"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="@drawable/background">

android:id="@+id/home"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:paddingLeft="3dp"

android:paddingTop="3dp"

android:paddingBottom="3dp"

android:src="@drawable/homeicon"/>

android:id="@+id/titleBar"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Page Title"

android:layout_marginLeft="10dp"

android:paddingTop="3dp"

android:textSize="18sp"

android:textStyle="bold"

android:typeface="serif"

android:textColor="#FFFFFF"

android:layout_centerHorizontal="true"/>

android:id="@+id/back"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:paddingRight="8dp"

android:paddingTop="8dp"

android:src="@drawable/backicon"

android:layout_alignParentRight="true"/>

android:id="@+id/separator1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:layout_below="@+id/home"

android:scaleType="fitXY"

android:src="@drawable/separatorimg" />

android:id="@android:id/android:list"

android:layout_below="@+id/separator1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:cacheColorHint="#00000000"

android:divider="@drawable/separatorimg">

将android:footerDividersEnabled设置为true(这是关于此事的其他问题中提供的答案)并不会改变任何内容。另外我没有禁用的项目,除非有某种默认页脚被禁用。

有任何想法吗?

编辑:当我滚动超过第一个/最后一个项目时,看起来顶部和底部分隔线上的分隔符分开显示,然后消失。看起来好像接口要继续,只有稍后才意识到这是最后一个项目,然后禁用分隔符。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值