コード例 #1
0
  @Override
  public void onStart() {
    super.onStart();

    // 刷新当前显示的项
    if (Setting.isChanged()) {
      mWeiboItemAdapter.notifyDataSetChanged();
      Setting.recover();
    }
  }
コード例 #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View view = initFragement(inflater, container);

    mTimeLineControllor = new WeiboController(this);
    mTimeLineView = (PullToRefreshListView) view.findViewById(R.id.timeline);
    mProgressBar = ProgressBarFactory.getProgressBar(mTimeLineView);

    mWeiboItemAdapter = mTimeLineControllor.getAdapter();
    Log.d(TAG, mWeiboItemAdapter.toString());
    mTimeLineView.setAdapter(mWeiboItemAdapter);

    mTimeLineView.setOnRefreshListener(mTimeLineControllor.getOnRefreshListener());

    mTimeLineControllor.initTimeLine();

    return view;
  }