24kshign / suspensionwindow Goto Github PK
View Code? Open in Web Editor NEWAndroid高仿微信阅读文章悬浮窗实现(含8.0权限适配)
Android高仿微信阅读文章悬浮窗实现(含8.0权限适配)
小浮窗的拖拽存在点小bug,在setOnTouchListener中的ACTION_MOVE params.y应做如下修改:
// 获取系统状态栏的高度
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
statusBarHeight = this.getResources().getDimensionPixelSize(resourceId);
}
case MotionEvent.ACTION_MOVE:
params.x = (int) (event.getRawX() - startX);
params.y = (int) (event.getRawY() - startY - statusBarHeight);
updateViewLayout();
break;
点击开启悬浮窗,自动返回到列表页,此时拖动不会出现下面的删除,红色区域不会出现,第二次拖动就出现了,并且点击事件跟touch事件冲突,无法响应点击事件
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.