Пример #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);
 }
Пример #2
0
 public boolean dismissPopupWindow() {
   if (isPopupOpened()) {
     mPopupWindow.dismiss();
     return true;
   }
   return false;
 }
Пример #3
0
 protected void release() {
   if (mPopupWindow != null) mPopupWindow.release();
 }
Пример #4
0
 public boolean isPopupOpened() {
   return mPopupWindow != null ? mPopupWindow.isShowing() : false;
 }
Пример #5
0
 public void setActivePopupItemThatWillDisabled(ItemRawPopup popup) {
   PopupWindowBuilder.getInstance(mActivity).setCurrentPopup(popup);
 }