我想这家伙的solution和它的作品(代码是基于pulltorefresh):
的XML布局(header.xml):
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ProgressBar
style="@android:style/Widget.ProgressBar.Small.Inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="16dp"
android:layout_marginTop="2dp" />
</RelativeLayout>
</LinearLayout>
当创建视图:
m_headerView = inflater.inflate(R.layout.header, this, false);
如果你想展示它,请这样做:
m_headerView.setPadding(0, 0, 0, 0);
m_headerView.setVisibility(View.VISIBLE);
,如果你想隐藏它,这样做:
m_headerView.setPadding(0, -1000, 0, 0);
m_headerView.setVisibility(View.GONE);
它完全在我们的project.hope很有帮助。
你可以发布一些布局XML或代码? – 2012-07-26 22:10:13
你有什么解决方案吗? – 2012-09-05 18:22:44
以下会帮助你吗? http://stackoverflow.com/questions/4961999/remove-bottom-divider-of-a-android-listview – Xebozone 2014-11-17 18:54:26