SmartPopupWindow
SmartPopupWindow copied to clipboard
提供关于PopupWindow使用过程中遇到的一些特殊问题的解决方案,例如:PopupWindow不响应点击外部消失和返回键消失的解决方法;PopupWindow精确计算要显示位置原理和方法;实现带箭头的上下文菜单遇到的坑;Android7....
SmartPopupWindow
提供关于PopupWindow使用过程中遇到的一些特殊问题的解决方案
-
PopupWindow不响应点击外部消失和返回键消失的解决方法
博文地址:http://www.cnblogs.com/popfisher/p/5608717.html -
PopupWindow精确计算要显示位置原理和方法
博文地址:http://www.cnblogs.com/popfisher/p/5608436.html -
不得不吐槽的Android PopupWindow的几个痛点(实现带箭头的上下文菜单遇到的坑)
博文地址:http://www.cnblogs.com/popfisher/p/5944054.html -
Android7.0 PopupWindow的兼容问题,修复了问题1和3中描述的问题,但是由引入了新的问题吗,具体详情
博文地址:http://www.cnblogs.com/popfisher/p/6434757.html
Github地址:https://github.com/PopFisher/SmartPopupWindow/blob/master/7.0PopupWindow.md -
屏幕旋转时调用PopupWindow update方法更新位置失效的问题及解决方案。
博文地址:http://www.cnblogs.com/popfisher/p/8029616.html
Github地址:https://github.com/PopFisher/SmartPopupWindow/blob/master/ScreenRotateUpdatePopup.md
效果如下图所示:##
问题1截图
问题2截图
问题3截图

问题4相关截图

1. PopupWindow高宽都设置为match_parent:从屏幕左上角弹出

2. 宽度wrap_content-高度match_parent:从屏幕左上角弹出

3. 宽度match_parent-高度wrap_content:从anchorView下方弹出

4. 宽度wrap_content-高度大于anchorView到屏幕底部的距离:从anchorView上方弹出,与anchorView左对齐

5. showAtLocation传入Gravity.Bottom:从anchorView下方弹出

6. 调用update方法更新第5点中弹出PopupWindow,发现PopupWindow的Gravity发生了改变
详细可以参考 http://www.jianshu.com/p/0df10893bf5b
