示例#1
0
 @Override
 public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
   mDidAction = true;
   dismiss();
   final MenuItem item = mAdapter.getItem(position);
   if (item.hasSubMenu()) {
     showMenu(item.getSubMenu());
   } else {
     if (mItemClickListener != null) {
       mItemClickListener.onMenuItemClick(item);
     }
   }
 }
示例#2
0
 private void showMenu(Menu menu) {
   mAdapter.setMenu(menu);
   mWindow.show();
 }