popupwindow

来源:互联网 发布:ubuntu 16.04安装jdk 编辑:程序博客网 时间:2024/05/22 22:10

popupwindow和dialog添加动画方式相同

 mPopupWindow=new PopupWindow(AppApplication.getApplication());                View  viewPopup=getLayoutInflater().inflate(R.layout.layout_fragment_chart_popup,null);                mPopupWindow.setContentView(viewPopup);                mPopupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);                mPopupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);                //去掉阴影部分                mPopupWindow.setBackgroundDrawable(new BitmapDrawable(null,""));                //在默认情况下弹出的窗口不可定焦                mPopupWindow.setFocusable(true);                mPopupWindow.setOutsideTouchable(true);                //mPopupWindow.setTouchable(true);                mPopupWindow.showAsDropDown(mImageViewPopup);//                View popupview=getLayoutInflater().inflate(R.layout.layout_fragment_chart_popup,null);//                PopupWindow popupWindow=new PopupWindow(popupview, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);//                popupWindow.setContentView(popupview);//                popupWindow.setFocusable(true);//                popupWindow.setOutsideTouchable(true);//                popupWindow.showAsDropDown(mImageViewPopup);//                popupWindow.setTouchable(true);//设置popupwindow可触摸
0 0
原创粉丝点击