コード例 #1
0
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   if (mTouchListener.isOpend()) {
     mTouchListener.closeOpenedItem();
     return;
   }
   if (mOnItemClickListener != null) {
     mOnItemClickListener.onItemClick(parent, view, position, id);
   }
 }
コード例 #2
0
 public void setSlideMode(SlideMode slideMode) {
   if (mSlideMode != slideMode) {
     if (isSlideAdapter()) {
       if (mTouchListener.isOpend()) {
         mTouchListener.closeOpenedItem();
       }
       mAdapter.setSlideMode(slideMode);
       mAdapter.notifyDataSetInvalidated();
     }
     mSlideMode = slideMode;
   }
 }
コード例 #3
0
 public void setSlideRightAction(SlideAction slideAction) {
   if (mSlideRightAction != slideAction) {
     if (isSlideAdapter()) {
       if (mTouchListener.isOpend()) {
         mTouchListener.closeOpenedItem();
       }
     }
     mSlideRightAction = slideAction;
     if (isSlideAdapter()) {
       SlideBaseAdapter adapter = mAdapter;
       setAdapter(null);
       setAdapter(adapter);
     }
   }
 }