首页 > Windows开发 > 详细

使用PopupWindow实现Menu功能

时间:2015-03-06 09:52:57      阅读:283      评论:0      收藏:0      [点我收藏+]

参考:http://www.cnblogs.com/sw926/p/3230659.html

注意:

PopupWindow会给PopupView设置Padding,会导致ContentView的左右上下都会存在空隙。

解决如下:

在显示PopupWindow(即执行PopupWindow.showAtLocation())后,重新设置PopupView的padding。

popupWindow.showAtLocation(x,x,x,x,);
ViewGroup popupView = (ViewGroup) popupWindow.getContentView().getParent();
if (popupView != null) {
    popupView.setPadding(0, 0, 0, 0);
}

 

使用PopupWindow实现Menu功能

原文:http://www.cnblogs.com/xingfuzzhd/p/4317236.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!