GithubHelp home page GithubHelp logo

ablexq / smartpopupwindow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from popfisher/smartpopupwindow

0.0 1.0 0.0 2.09 MB

提供关于PopupWindow使用过程中遇到的一些特殊问题的解决方案,例如:PopupWindow不响应点击外部消失和返回键消失的解决方法;PopupWindow精确计算要显示位置原理和方法;实现带箭头的上下文菜单遇到的坑;Android7.0 PopupWindow的兼容问题;屏幕旋转时调用PopupWindow update方法更新位置失效的问题及解决方案

Java 100.00%

smartpopupwindow's Introduction

SmartPopupWindow

提供关于PopupWindow使用过程中遇到的一些特殊问题的解决方案

  1. PopupWindow不响应点击外部消失和返回键消失的解决方法
    博文地址:http://www.cnblogs.com/popfisher/p/5608717.html

  2. PopupWindow精确计算要显示位置原理和方法
    博文地址:http://www.cnblogs.com/popfisher/p/5608436.html

  3. 不得不吐槽的Android PopupWindow的几个痛点(实现带箭头的上下文菜单遇到的坑)
    博文地址:http://www.cnblogs.com/popfisher/p/5944054.html

  4. Android7.0 PopupWindow的兼容问题,修复了问题1和3中描述的问题,但是由引入了新的问题吗,具体详情
    博文地址:http://www.cnblogs.com/popfisher/p/6434757.html
    Github地址:https://github.com/PopFisher/SmartPopupWindow/blob/master/7.0PopupWindow.md

  5. 屏幕旋转时调用PopupWindow update方法更新位置失效的问题及解决方案。
    博文地址:http://www.cnblogs.com/popfisher/p/8029616.html
    Github地址:https://github.com/PopFisher/SmartPopupWindow/blob/master/ScreenRotateUpdatePopup.md

效果如下图所示:##

问题1截图

不会响应外部点击消失事件的情况

问题2截图

动态计算弹出框的位置 动态计算弹出框的位置

问题3截图

第一排左边按钮菜单 第一排右边按钮菜单 第二排中间按钮菜单

问题4相关截图

7.0主Activity

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

smartpopupwindow's People

Contributors

popfisher avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.