去除ListView滑到顶部和底部时边缘的黑色阴影:
android:fadingEdge="none"
----------------------------------------------------
去除拖动时默认的黑色背景:
android:cacheColorHint="#00000000"
或
listView.setCacheColorHint(Color.TRANSPARENT);
----------------------------------------------------
去除选中时的黄色底色:
android:listSelector="#00000000"
或
listView.setSelector(new ColorDrawable(Color.TRANSPARENT));
---------------------------------------------------
去除行与行之间的黑线:
android:divider=" #00000000 "
或
listView.setDivider(null);
--------------------------------------------------
ListView刷新后自动滚到最底部:
listView.setSelection( listView .getAdapter().getCount()-1);
去掉滑动条:
android:scrollbars="none"
设置最小行高:
在item xml文件中根元素设置:android:minHeight="xxdip"
给listview添加addFootView:
View footView=getLayoutInflater().inflate(R.layout.footview, null); listview.addFooterView(footView); listview.setAdapter(adapter);
时间: 2024-10-14 12:45:20