Пример #1
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // inflater the layout
    view = inflater.inflate(R.layout.jwc_news_layout, null);

    // 取得屏幕尺寸大小
    displayScreenSize();
    jwc_listView = (MyListView) view.findViewById(R.id.jwc_listView);
    refreshFragment();

    jwc_listView.setOnRefreshListener(
        new OnRefreshListener() {
          public void onRefresh() {
            RefreshTask rTask = new RefreshTask();
            rTask.execute(1000);
          }
        });

    return view;
  }