Exemplo n.º 1
0
 private void onMenuClick() {
   Log.e(TAG, "onMenuClick");
   if (mPopupWindow == null) {
     mPopupWindow = PopupWindowBuilder.getInstance(mActivity);
     mPopupWindow.showAsDropDown(mActivity.findViewById(mMenu.getItemId()), this);
     Log.e(TAG, "onMenuClick new");
     return;
   }
   if (mPopupWindow.isShowing()) return;
   mPopupWindow.showAsDropDown(mActivity.findViewById(mMenu.getItemId()), this);
 }
Exemplo n.º 2
0
 public boolean dismissPopupWindow() {
   if (isPopupOpened()) {
     mPopupWindow.dismiss();
     return true;
   }
   return false;
 }
Exemplo n.º 3
0
 protected void release() {
   if (mPopupWindow != null) mPopupWindow.release();
 }
Exemplo n.º 4
0
 public boolean isPopupOpened() {
   return mPopupWindow != null ? mPopupWindow.isShowing() : false;
 }
Exemplo n.º 5
0
 public void setActivePopupItemThatWillDisabled(ItemRawPopup popup) {
   PopupWindowBuilder.getInstance(mActivity).setCurrentPopup(popup);
 }