【问题标题】:Removing divider after a footer in a ListView在 ListView 中的页脚后删除分隔符
【发布时间】:2011-11-04 15:46:27
【问题描述】:

如何在 ListView 的页脚后删除 ListView 分隔符? 使用android:footerDividersEnabled="false" 会在我的 ListView 的最后一项之后删除分隔线,但不是在我的 ListView 的页脚之后...

谢谢

【问题讨论】:

    标签: android listview divider


    【解决方案1】:

    这对我有用,让 android:layout_height="wrap_content" 成为 ListView。

    这是我的 ListView xml

    <ListView
            android:id="@id/android:list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:cacheColorHint="@color/transparent"
            android:divider="@color/list_divider"
            android:dividerHeight="1dp"
            android:fadeScrollbars="true"
            android:focusable="true"
            android:footerDividersEnabled="true"
            android:scrollbars="none"
            android:transcriptMode="alwaysScroll" 
            />
    

    【讨论】:

    • 应该被接受,并且似乎是来自 android 的史诗级错误
    【解决方案2】:

    将页脚的大小更改为 0px 或将可见性设置为 GONE

    【讨论】:

      猜你喜欢
      • 2012-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-21
      • 1970-01-01
      • 2011-10-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多