时光

Strive to be an excellent developer

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
/**
     * 设置PopupWindow
     * @param anchor
     * @param view
     * @param popupWindow
     * @return
     */
    private static PopupWindow setPopupWindow(View anchor, View view, PopupWindow popupWindow) {
        popupWindow = new PopupWindow(view, anchor.getWidth(), android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        popupWindow.setOutsideTouchable(true);
        popupWindow.setFocusable(true);
        popupWindow.showAsDropDown(anchor);
        return popupWindow;
    }

 

posted on 2013-10-30 14:05  朱东方  阅读(184)  评论(0编辑  收藏  举报