예제 #1
0
  @Override
  public void initComponents() {
    lvPullDown = (PullDownListView) innerView.findViewById(R.id.lvPullDown);
    tvLoading = (TextView) innerView.findViewById(R.id.tvLoading);
    tvNodata = (TextView) innerView.findViewById(R.id.tvNodata);
    if (listMessage == null) {
      listMessage = new ArrayList<SbbsMeMessage>();
    }
    adapter = new SbbsMeMessageAdapter(getActivity(), listMessage);
    lvPullDown.getListView().setAdapter(adapter);
    loader = new SbbsMessageLoader(getActivity());
    lvPullDown.enableAutoFetchMore(true, 1);
    lvPullDown.setOnPullDownListener(this);

    int devide = UIUtils.dipToPx(8);
    lvPullDown.getListView().setDivider(null);
    lvPullDown.getListView().setDividerHeight(devide);
    lvPullDown.getListView().setPadding(devide, devide, devide, devide);
    lvPullDown.getListView().setOverScrollMode(View.OVER_SCROLL_NEVER);
    lvPullDown.getListView().setFocusableInTouchMode(false);
  }
 @Override
 public void initEvents() {
   lvPulldown.getListView().setOnItemClickListener(this);
   lvPulldown.setOnPullDownListener(this);
   loader.registerListener(0, this);
 }