您的位置:首页 > 移动开发 > Android开发

android popupwindow的实现

2016-05-05 11:08 453 查看
View view=getLayoutInflater().inflate(R.layout.layout_popupwindow,null,false);
final PopupWindow popupwindow = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, true);
popupwindow.setTouchable(true);
popupwindow.setTouchInterceptor(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return false;
}
});
popupwindow.setBackgroundDrawable(new ColorDrawable(0x00000000));
RelativeLayout bottom=(RelativeLayout)findViewById(R.id.bottom);
popupwindow.showAtLocation(bottom, Gravity.BOTTOM,0,bottom.getHeight());
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: