Scoall解决条目加载冲突专项
public class MyListView extends ListView {
public MyListView(Context context) {
super(context);
}
public MyListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyListView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int measureSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, measureSpec);
}
}
布局
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
android:id="@+id/pull_listview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.youth.banner.Banner
android:id="@+id/myBanner"
android:layout_width="match_parent"
android:layout_height="200dp" />
<com.example.dell.moni_1120.MyListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"></com.example.dell.moni_1120.MyListView>
</LinearLayout>
</com.handmark.pulltorefresh.library.PullToRefreshScrollView>