80,351
社区成员
发帖
与我相关
我的任务
分享
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_homepage, container, false);
initAdData();
mPullScrollView = new PullToRefreshScrollView(getActivity());
getActivity().setContentView(mPullScrollView);
mPullScrollView.setOnRefreshListener(new OnRefreshListener<ScrollView>() {
@Override
public void onPullDownToRefresh(PullToRefreshBase<ScrollView> refreshView) {
new GetDataTask().execute();
}
@Override
public void onPullUpToRefresh(PullToRefreshBase<ScrollView> refreshView) {
}
});
mScrollView = mPullScrollView.getRefreshableView();
mScrollView.addView(rootView);
setLastUpdateTime();
return mPullScrollView;
}
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bilibg"
android:clickable="true"
android:orientation="vertical"
android:scrollbars="vertical" >
<include layout="@layout/banner" />
。。。。。。。。
</LinearLayout>
</ScrollView>