oShenLi1 2015-04-22 16:36 采纳率: 0%
浏览 5825

listview调用addfooterview添加页脚,发现页脚底部有条线,请问怎么去除?

如题“listview调用addfooterview添加页脚,发现页脚底部有条线,请问怎么去除?”

下面是我的代码

listview

 <ListView
        android:id="@+id/search_history_list"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:cacheColorHint="#00000000"
        android:padding="@dimen/padding_15"
        android:scrollbars="none" />  

item.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="@dimen/padding_10"
        android:singleLine="true"
        android:textSize="@dimen/text_size_16"
        android:textColor="@color/gray_3" />

</RelativeLayout>

代码片段

listView = (ListView) findViewById(R.id.search_history_list);
        historyAdapter = new SearchHistoryAdapter(this, historyList);
        clearView = LayoutInflater.from(this).inflate(R.layout.search_footview,
                null);
        txtClear = (TextView) clearView.findViewById(R.id.txtClear);
        listView.addFooterView(clearView);
        listView.setAdapter(historyAdapter);
  • 写回答

3条回答 默认 最新

  • zhangzhonghu551102 2015-04-22 23:51
    关注

    加headerview或者footerview,监听滑动,动态改变view的高度,根据需要改变布局中item的状态,或者加动画什么的,具体看代码

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!