1
我使用swipelistview
庫,但我要的是在同一時間打開剛纔一個項目,的Android swipelistview刷卡只有一個項目
是有辦法,我可以做到這一點還是我必須拿出一個workarround?
我使用swipelistview
庫,但我要的是在同一時間打開剛纔一個項目,的Android swipelistview刷卡只有一個項目
是有辦法,我可以做到這一點還是我必須拿出一個workarround?
您應該使用的代碼如下:
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
mSwipeListView.setSwipeListViewListener(new com.example.swipelistview.BaseSwipeListViewListener() {
@Override
public void onOpened(int position, boolean toRight) {
for(int i=0;i<mSwipeListView.getChildCount();i++){
if(i!=position)
mSwipeListView.closeAnimate(i);
}
試試這個它可能工作,我沒有測試它