# SmartPopupWindow #
提供关于PopupWindow使用过程中遇到的一些特殊问题的解决方案
1. PopupWindow不响应点击外部消失和返回键消失的解决方法<br>博文地址:[http://www.cnblogs.com/popfisher/p/5608717.html](http://www.cnblogs.com/popfisher/p/5608717.html "PopupWindow不响应点击外部消失和返回键消失的解决方法")
2. PopupWindow精确计算要显示位置原理和方法<br>博文地址:[http://www.cnblogs.com/popfisher/p/5608436.html](http://www.cnblogs.com/popfisher/p/5608436.html "PopupWindow精确计算要显示位置原理和方法")
3. 不得不吐槽的Android PopupWindow的几个痛点(实现带箭头的上下文菜单遇到的坑)<br>博文地址:[http://www.cnblogs.com/popfisher/p/5944054.html](http://www.cnblogs.com/popfisher/p/5944054.html "不得不吐槽的Android PopupWindow的几个痛点")
4. Android7.0 PopupWindow的兼容问题,修复了问题1和3中描述的问题,但是由引入了新的问题吗,具体详情<br> 博文地址:[http://www.cnblogs.com/popfisher/p/6434757.html](http://www.cnblogs.com/popfisher/p/6434757.html "博文地址") <br> Github地址:[https://github.com/PopFisher/SmartPopupWindow/blob/master/7.0PopupWindow.md](https://github.com/PopFisher/SmartPopupWindow/blob/master/7.0PopupWindow.md "7.0PopupWindow介绍Github地址")
5. 屏幕旋转时调用PopupWindow update方法更新位置失效的问题及解决方案。<br>博文地址:[http://www.cnblogs.com/popfisher/p/8029616.html](http://www.cnblogs.com/popfisher/p/8029616.html "博客园地址")<br>Github地址:[https://github.com/PopFisher/SmartPopupWindow/blob/master/ScreenRotateUpdatePopup.md](https://github.com/PopFisher/SmartPopupWindow/blob/master/ScreenRotateUpdatePopup.md "ScreenRotateUpdatePopup.md")
## 效果如下图所示:##
### 问题1截图
![不会响应外部点击消失事件的情况](/docpic/1.png "主界面入口")
### 问题2截图
![动态计算弹出框的位置](/docpic/2.png "在anchorView下面弹出PopupWindow") ![动态计算弹出框的位置](/docpic/3.png "在anchorView上面弹出PopupWindow")
### 问题3截图
![第一排左边按钮菜单](/docpic/topleft.png "符合预期") ![第一排右边按钮菜单](/docpic/topright.png "出乎意料了,不符合预期") ![第二排中间按钮菜单](/docpic/bottomcenter.png "符合预期")
### 问题4相关截图
![7.0主Activity](/docpic/7.0.png "7.0 PopupWindow兼容性测试")
**1. PopupWindow高宽都设置为match\_parent:从屏幕左上角弹出**
![](/docpic/7.0_1.png "PopupWindow高宽都设置为match_parent")
**2. 宽度wrap\_content-高度match\_parent:从屏幕左上角弹出**
![](/docpic/7.0_2.png "宽度wrap_content-高度match_parent")
**3. 宽度match\_parent-高度wrap\_content:从anchorView下方弹出**
![](/docpic/7.0_3.png "宽度match_parent-高度wrap_content")
**4. 宽度wrap_content-高度大于anchorView到屏幕底部的距离:从anchorView上方弹出,与anchorView左对齐**
![](/docpic/7.0_4.png "宽度wrap_content-高度大于anchorView到屏幕底部的距离")
**5. showAtLocation传入Gravity.Bottom:从anchorView下方弹出**
![](/docpic/7.0_5.png "宽度wrap_content-高度大于anchorView到屏幕底部的距离")
**6. 调用update方法更新第5点中弹出PopupWindow,发现PopupWindow的Gravity发生了改变**
详细可以参考 [http://www.jianshu.com/p/0df10893bf5b](http://www.jianshu.com/p/0df10893bf5b "PopupWindow 在 Android N(7.0) 的兼容性问题")
![](/docpic/7.0_6.png "调用update方法更新弹出Popup")
没有合适的资源?快使用搜索试试~ 我知道了~
多样式popuwindow 弹框
共299个文件
dex:45个
class:42个
xml:40个
需积分: 8 0 下载量 88 浏览量
2023-01-04
14:38:19
上传
评论
收藏 11.08MB ZIP 举报
温馨提示
Android7.0 PopupWindow的兼容问题 以及popuwindow显示在view的各个方位的demo
资源推荐
资源详情
资源评论
收起资源包目录
多样式popuwindow 弹框 (299个子文件)
_F174nh5gTw5aHUqfdTsRKHcpWs= 19KB
_F174nh5gTw5aHUqfdTsRKHcpWs= 19KB
resources-debug.ap_ 48KB
app-debug.apk 697KB
gradlew.bat 2KB
classAnalysis.bin 528KB
jarAnalysis.bin 251KB
taskHistory.bin 133KB
sha1-checksums.bin 75KB
fileHashes.bin 30KB
taskHistory.bin 30KB
md5-checksums.bin 26KB
outputFiles.bin 20KB
taskJars.bin 19KB
resourceHashesCache.bin 18KB
last-build.bin 1B
last-build.bin 1B
TopBottomArrowPopupActivity.class 6KB
PopupWindowMainActivity.class 5KB
Android7_0PopupActivity.class 4KB
CustomPosPopupActivity.class 3KB
ScreenChangeUpdatePopupActivity.class 3KB
CustomPosPopupActivity$CustomAdapter.class 3KB
ScreenChangeUpdatePopupActivity$1.class 2KB
PopupWindowMainActivity$1.class 2KB
CustomPosPopupActivity$1.class 2KB
CustomPosPopupActivity$CustomAdapter$1.class 2KB
TopBottomArrowPopupActivity$8.class 2KB
R$id.class 1KB
PopupWindowUtil.class 1KB
TopBottomArrowPopupActivity$7.class 1KB
ScreenChangeUpdatePopupActivity$2.class 1KB
TopBottomArrowPopupActivity$9.class 1KB
TopBottomArrowPopupActivity$1.class 1KB
TopBottomArrowPopupActivity$4.class 1KB
TopBottomArrowPopupActivity$3.class 1KB
TopBottomArrowPopupActivity$2.class 1KB
TopBottomArrowPopupActivity$5.class 1KB
TopBottomArrowPopupActivity$6.class 1KB
Android7_0PopupActivity$1.class 1KB
ScreenUtils.class 1KB
R.class 997B
R$layout.class 874B
R$dimen.class 873B
R$styleable.class 824B
R$styleable.class 809B
R$drawable.class 793B
BuildConfig.class 765B
R$color.class 735B
CustomPosPopupActivity$ViewHolder.class 729B
R$string.class 622B
R$dimen.class 599B
R.class 559B
R$attr.class 557B
R$attr.class 542B
R$style.class 508B
R$mipmap.class 455B
R$id.class 453B
R.class 266B
classes.dex 1.34MB
classes.dex 1.34MB
classes.dex 25KB
TopBottomArrowPopupActivity.dex 5KB
PopupWindowMainActivity.dex 4KB
Android7_0PopupActivity.dex 3KB
CustomPosPopupActivity.dex 3KB
ScreenChangeUpdatePopupActivity.dex 2KB
CustomPosPopupActivity$CustomAdapter.dex 2KB
ScreenChangeUpdatePopupActivity$1.dex 2KB
PopupWindowMainActivity$1.dex 2KB
CustomPosPopupActivity$1.dex 2KB
R$id.dex 2KB
TopBottomArrowPopupActivity$8.dex 1KB
PopupWindowUtil.dex 1KB
CustomPosPopupActivity$CustomAdapter$1.dex 1KB
TopBottomArrowPopupActivity$6.dex 1KB
TopBottomArrowPopupActivity$4.dex 1KB
TopBottomArrowPopupActivity$3.dex 1KB
TopBottomArrowPopupActivity$2.dex 1KB
TopBottomArrowPopupActivity$5.dex 1KB
TopBottomArrowPopupActivity$1.dex 1KB
TopBottomArrowPopupActivity$7.dex 1KB
ScreenChangeUpdatePopupActivity$2.dex 1KB
TopBottomArrowPopupActivity$9.dex 1KB
R$dimen.dex 1KB
ScreenUtils.dex 1KB
R$layout.dex 1KB
R.dex 1KB
Android7_0PopupActivity$1.dex 1KB
R$styleable.dex 1KB
R$styleable.dex 1KB
R$drawable.dex 1KB
R$color.dex 1KB
BuildConfig.dex 960B
CustomPosPopupActivity$ViewHolder.dex 960B
R$string.dex 952B
R$dimen.dex 944B
R$attr.dex 892B
R$attr.dex 884B
R$style.dex 848B
共 299 条
- 1
- 2
- 3
资源评论
饭饭Android虫虫
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功