Пример #1
0
 private void changeSlideRightAction(MenuItem item) {
   if (mSlideListView.getSlideRightAction() == SlideAction.SCROLL) {
     mSlideListView.setSlideRightAction(SlideAction.REVEAL);
   } else {
     mSlideListView.setSlideRightAction(SlideAction.SCROLL);
   }
   if (item != null) {
     item.setTitle("切换SlideRightAction:" + mSlideListView.getSlideRightAction().toString());
   }
   Toast.makeText(
           this,
           "切换SlideRightAction:" + mSlideListView.getSlideRightAction().toString(),
           Toast.LENGTH_SHORT)
       .show();
 }
Пример #2
0
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
   // Inflate the menu; this adds items to the action bar if it is present.
   getMenuInflater().inflate(R.menu.main, menu);
   // SlideMode
   MenuItem item = menu.findItem(R.id.menu_slide_mode);
   item.setTitle("切换SlideMode:" + mSlideListView.getSlideMode().toString());
   // SlideLeftAction
   item = menu.findItem(R.id.menu_slide_left_action);
   item.setTitle("切换SlideLeftAction:" + mSlideListView.getSlideLeftAction().toString());
   // SlideRightAction
   item = menu.findItem(R.id.menu_slide_right_action);
   item.setTitle("切换SlideRightAction:" + mSlideListView.getSlideRightAction().toString());
   return true;
 }