这几天一直在使用上下拉刷新的控件基本上使用的都是一些githup上开源的控件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xlistview="http://schemas.android.com/apk/res/包名称
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_layout"/>
..........................
<cn............widget.XListView
android:id="@+id/xlistview"
android:scrollbars="none"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#00000000"
xlistview:plaColumnNumber ="1"
android:layout_margin="5dp" />
</LinearLayout>
代码引用:R.styleable.PullToRefresh_headerBackground
<declare-styleable name="PullToRefresh">
<attr name="adapterViewBackground" format="reference|color" />
<attr name="headerBackground" format="reference|color" />
<attr name="headerTextColor" format="color" />
<attr name="mode">
<flag name="pullDownFromTop" value="0x1" />
<flag name="pullUpFromBottom" value="0x2" />
<flag name="both" value="0x3" />
</attr>..............
前边是定义名称PullToRefresh,后边是属性名称headerBackground