<com.handmark.pulltorefresh.library.PullToRefreshGridView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:layout_marginTop="@dimen/animal_species_margin"
android:layout_marginStart="@dimen/animal_species_margin"
android:layout_marginEnd="@dimen/animal_species_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnWidth="@dimen/species_gridview_ih"
android:gravity="center_horizontal"
android:horizontalSpacing="@dimen/species_gridview_hs"
android:numColumns="auto_fit"
android:stretchMode="columnWidth"
android:verticalSpacing="@dimen/species_gridview_vs"
ptr:ptrAnimationStyle="flip"
ptr:ptrHeaderBackground="#ffffff"
ptr:ptrHeaderSubTextColor="#ff0000"
ptr:ptrHeaderTextColor="@color/animal_weight_text2"
ptr:ptrListViewExtrasEnabled="false"
ptr:ptrMode="pullFromStart"
ptr:ptrRefreshableViewBackground="#ffffff"
ptr:ptrScrollingWhileRefreshingEnabled="true"
ptr:ptrShowIndicator="true"
ptrMode设置上拉,或者下拉,both,
ptrDrawable设置自定义下拉图标
ptrAnimationStyle设置刷新动画,圈圈
ptrRefreshableViewBackground 设置整个mPullRefreshListView的背景色
ptrHeaderBackground 设置下拉Header或者上拉Footer的背景色
ptrHeaderTextColor 用于设置Header与Footer中文本的颜色
ptrHeaderSubTextColor 用于设置Header与Footer中上次刷新时间的颜色
ptrShowIndicator如果为true会在mPullRefreshListView中出现icon,右上角和右下角,挺有意思的。
ptrHeaderTextAppearance , ptrSubHeaderTextAppearance分别设置拉Header或者上拉Footer中字体的类型颜色等等。
ptrRotateDrawableWhilePulling当动画设置为rotate时,下拉是是否旋转。
ptrScrollingWhileRefreshingEnabled刷新的时候,是否允许ListView或GridView滚动。觉得为true比较好。
ptrListViewExtrasEnabled 决定了Header,Footer以何种方式加入mPullRefreshListView,true为headView方式加入,就是滚动时刷新头部会一起滚动。