PopupWindow的使用

private void showShareInfoPopupManager(){
View v=LayoutInflater.from(this).inflate(R.layout.fragment_navi_ready_popup, null);




v.findViewById(R.id.imgBtnRoute).setOnClickListener(this);
v.findViewById(R.id.imgBtnShareWeiboPoisition).setOnClickListener(this);
v.findViewById(R.id.imgBtnShareWeiboTraffic).setOnClickListener(this);


mPopupWindow = new PopupWindow(v, LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);


mPopupWindow.setBackgroundDrawable(new BitmapDrawable());
mPopupWindow.setAnimationStyle(R.style.PopupAnimation);
mPopupWindow.setFocusable(true);
mPopupWindow.setOnDismissListener(null);
mPopupWindow.update();
//popupWindow.showAsDropDown(this, -20, 0);
mPopupWindow.showAtLocation((ViewGroup) getWindow().getDecorView(),
Gravity.BOTTOM|Gravity.LEFT, -15, 15);
}

你可能感兴趣的:(null)