Comments (4)
小伙子,你直接监听 Activity 生命周期,如果遇到特定的 Activity 的时候,直接取消显示悬浮窗,这样实现是否能满足你的需求?
from easywindow.
轮子哥,我想通过当前topActivity判断是否显示,我的方法是
private val checkOnLauncherRunnable = object : Runnable {
override fun run() {
//判断是否在launcher
if (isLauncherOnTop(this@MainActivity)) {
myWindow.setWidth(0)
.setHeight(0)
} else {
myWindow.setWidth(WINDOW_WIDTH - STEP)
.setHeight(WINDOW_HEIGH - STEP)
}
// 通过postDelayed方法实现每隔一秒钟执行一次
handler.postDelayed(this, CHECK_LAUNCHER_MILLION)
}
}
通过修改window的宽高实现,但是当window在隐藏->显示的时候,会有一种从右下角飘上来的感觉。
from easywindow.
轮子哥,我想通过当前topActivity判断是否显示,我的方法是
private val checkOnLauncherRunnable = object : Runnable { override fun run() { //判断是否在launcher if (isLauncherOnTop(this@MainActivity)) { myWindow.setWidth(0) .setHeight(0) } else { myWindow.setWidth(WINDOW_WIDTH - STEP) .setHeight(WINDOW_HEIGH - STEP) } // 通过postDelayed方法实现每隔一秒钟执行一次 handler.postDelayed(this, CHECK_LAUNCHER_MILLION) } }
通过修改window的宽高实现,但是当window在隐藏->显示的时候,会有一种从右下角飘上来的感觉。
小伙子,我说的那种方案是没有办法实现你的需求么?
from easywindow.
超过一个星期没有响应,自动关闭此 issue。
from easywindow.
Related Issues (20)
- 做了个悬浮菜单栏 HOT 3
- 请教一下 HOT 11
- 请教关于点击穿透 HOT 3
- 请教一下大佬,有没有设置activity过滤的功能啊,就是在设定的那几个activity不显示悬浮窗 HOT 3
- 能否支持view的部分边界移动到屏幕外 HOT 2
- 竖屏切换至横屏之后悬浮窗位置显示异常 HOT 11
- 全局悬浮窗拖动卡顿 HOT 13
- 全局模式悬浮窗的触摸式事件无法透传到桌面 HOT 1
- 在webview所在的activity中使用时,屏幕截图然后返回桌面,NullPointerException异常,具体在描述里。 HOT 3
- [Bug]:内存泄漏 HOT 2
- [建议]:优化调用写法 HOT 2
- [Bug]:内存泄漏,必现 HOT 4
- [Bug]:窗口会自动上下浮动 HOT 5
- [Bug]:横竖屏切换,悬浮窗不会自动贴边 HOT 5
- [疑惑]:EasyWindow 在多个Activity中展示的时候 切换 activity 保存坐标问题 HOT 4
- [Bug]:移动、横竖屏后不贴边 HOT 11
- [建议]:增加控制台的悬浮窗 HOT 2
- [Bug]:Didn't find class "com.hjq.window.draggable.SpringDraggable" HOT 1
- [疑惑]:正常弹出窗之后,能否实现点击弹窗外区域关闭弹窗功能 HOT 2
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 easywindow.