Comments (16)
from basepopup.
setBackPressEnable(false) ,不是true
from basepopup.
好像我的小米手机设定true 和 false 都没效果,但用模拟器有效果
from basepopup.
模拟器设置了,也没用
from basepopup.
有没有具体的代码,或者其实您可以进行调试。。。
以及是否会是特定的api或系统版本导致的,如果您能帮忙排查,万分感谢-V-
from basepopup.
@razerdp 你好 setBackPressEnable(false) 无效
我在红米6.0 华为6.0 魅族5.1系统上测试不能拦截返回按钮
from basepopup.
@Mr-PolarBear
@NikoSoftware
@flyjiang2014
对于Android M以上暂时无法修复呢。。。残念(首页README已经补充)
from basepopup.
@OverRide
public boolean onBeforeDismiss() {
if (canBack) {
return true;
} else {
return false;
}
}
自己用一个变量去控制,完美解决
from basepopup.
啊哈,也可以的(虽然不太完美)。。。我都忘了我写过这个回调了- -我现在就加到readme里面
from basepopup.
不过这个方法有个问题,因为beforeDismiss会很粗暴的影响dismiss()流程,如果我只需要返回键不dismiss而点其他地方可以dismiss,这个方法就可能需要一个方法来提前把canBack改变以适应不同的需要,所以并不是非常完美哦
from basepopup.
是的,不是很完美,现在finish页面的时候,我就是先set成true再dismiss... 不然泄露。不过可以临时解决一下项目需求。
from basepopup.
@lapDog 是的,在activity下捕捉是可以的哈哈,只是如果想从popu内部捕捉,目前来说除非能拿到popup内部的那个framelayout,否则似乎没啥办法呢
from basepopup.
同时加多一个条件 mPopupWindow.setFocusable(true);就可以按返回键关闭了
from basepopup.
这个onBrforeDismiss怎么解决的返回键问题 没怎么看懂
from basepopup.
@zhupengxiang 在activity给beforeDismiss回调,在activity捕捉keyevent,或者backpress从而决定popupwindow是否返回关闭
from basepopup.
@NikoSoftware
@flyjiang2014
@Mr-PolarBear
@zl277287818
@lapDog
@JadynChan
@zhupengxiang
感谢你们的讨论和idea~在1.8.9里面我用了一种新的思路去解决这个问题,建议大家升级到1.8.9
具体解决方式:1.8.9 解决方案
如果大家有更完美的解决方案,欢迎继续探讨哦~
本issue不关闭。
from basepopup.
Related Issues (20)
- EditText焦点问题 HOT 16
- 横屏时,当布局大小接近全屏时,那个背景半透明不起作用 HOT 1
- RatingBar在BasePopup上的使用问题 HOT 1
- BasePopupWindow的内存泄漏问题 HOT 1
- setOutSideDismiss=true的时候setOutSideTouchable=true不生效 HOT 1
- Edittext导致背景颜色失效,变成透明(8.0及以下才会出现) HOT 3
- 如何从底部弹出到屏幕中心 HOT 4
- 录屏时,能否屏蔽pop? HOT 1
- 您好,怎么样可以不拦截返回键 HOT 1
- 华为的底部导航条沉浸式失效
- ContentView区域的背景上如何支持事件穿透? HOT 1
- setOutSideTouchable(true)后事件并没有穿透 HOT 4
- 安卓12默认支持Background blur以及Blur behind,希望可以适配一下 HOT 1
- 弹窗背景触摸后透明 HOT 1
- 华为平板(平行世界模式)状态栏无法覆盖问题 HOT 1
- 希望加上弹性动画 HOT 1
- 各位大佬,有没有办法拿到栈顶activity的dialog对象呢? HOT 1
- 使用showPopupWindow(view)的方式显示,动画效果无效 HOT 1
- 希望可以支持Jetpack Startup HOT 1
- 当Context是Activity的时候找不到DecorView HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basepopup.