Пример #1
0
 public void setPullRefushMode(boolean pullDown, boolean pullUp) {
   if (pullDown && pullUp) {
     mPullListView.setMode(Mode.BOTH);
   } else if (!pullDown && !pullUp) {
     mPullListView.setMode(Mode.DISABLED);
   } else {
     if (pullDown) {
       mPullListView.setMode(Mode.PULL_DOWN_TO_REFRESH);
     } else {
       mPullListView.setMode(Mode.PULL_UP_TO_REFRESH);
     }
   }
 }
Пример #2
0
 @Override
 protected void initViewAdAction(View root, Bundle bundle) {
   mPullListView = (PullToRefreshListView) mRootView.findViewById(R.id.listView);
   mEmpty = (TextView) mRootView.findViewById(R.id.empty);
   mProgressLay = mRootView.findViewById(R.id.lay_progress);
   getListView().setCacheColorHint(0);
   mPullListView.setMode(Mode.BOTH);
   mPullListView.setOnRefreshListener(this);
   mPullListView.setOnItemClickListener(this);
   mPullListView.setEmptyView(mEmpty);
   // getListView().setDivider(getResources().getDrawable(R.drawable.divider_padding));
   if (bundle != null) {
     mPageNum = bundle.getInt("mPageNum");
     mPageCount = bundle.getInt("mPageCount");
   }
 }
Пример #3
0
 public ListView getListView() {
   return mPullListView.getRefreshableView();
 }