如题“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);