美文网首页
PopupWindow

PopupWindow

作者: 仩渧哋寵 | 来源:发表于2016-04-11 14:35 被阅读123次

PopupWindow可以创建类似对话框风格的窗口

创建的步骤:

1.调用PopupWindow的构造器创建Popupwindow对象

2.两种方式:

(1)调用PopupWindow的showAsDropDown(View v)将PopupWindow作为v组建的下拉组件显示出来;

(2)调用PopupWindow的showAtLocation()方法将PopupWindow在指定位置显示出来

MainActivity:

Popup.xml

main.xml:

相关文章

网友评论

      本文标题:PopupWindow

      本文链接:https://www.haomeiwen.com/subject/nikilttx.html