public void showRightTopPop() {

    if (mRightTopPopupWindow == null) {
      initRightTopPop();
    }

    // DialogUtil.RightTopPopupItem moveItem = mRightTopPopupWindow.adapter.getItem(0);
    DialogUtil.RightTopPopupItem deleteItem = mRightTopPopupWindow.adapter.getItem(0);

    if (!mAttachmentFileObject.isOwner()) {
      deleteItem.enabled = false;
    } else {
      deleteItem.enabled = true;
    }

    mRightTopPopupWindow.adapter.notifyDataSetChanged();

    Rect rectgle = new Rect();
    Window window = getWindow();
    window.getDecorView().getWindowVisibleDisplayFrame(rectgle);
    int StatusBarHeight = rectgle.top;
    int contentViewTop = window.findViewById(Window.ID_ANDROID_CONTENT).getTop();
    // int TitleBarHeight= contentViewTop - StatusBarHeight;
    mRightTopPopupWindow.adapter.notifyDataSetChanged();
    mRightTopPopupWindow.setAnimationStyle(android.R.style.Animation_Dialog);
    mRightTopPopupWindow.showAtLocation(icon, Gravity.TOP | Gravity.RIGHT, 0, contentViewTop);
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    //        if (fileUrlSuccess) {
    getMenuInflater().inflate(R.menu.project_attachment_download, menu);
    if (!mAttachmentFileObject.isOwner()) {
      menu.findItem(R.id.action_delete).setVisible(false);
    }
    //        } else {
    //            getMenuInflater().inflate(R.menu.menu_empty, menu);
    //        }

    return super.onCreateOptionsMenu(menu);
  }
 @Override
 public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
   switch (position) {
     case 0:
       if (!mAttachmentFileObject.isOwner()) {
         return;
       } else {
         action_delete();
       }
       break;
   }
   mRightTopPopupWindow.dismiss();
 }