时间:2023-10-05 16:30:01 | 来源:网站运营
时间:2023-10-05 16:30:01 来源:网站运营
XFloatView 一个简易的悬浮窗实现方案:allprojects { repositories { ... maven { url "https://jitpack.io" } }}
2.然后在dependencies添加:dependencies { ... implementation 'com.github.xuexiangjys:XFloatView:1.0.1'}
/** * @return 获取根布局的ID */protected abstract int getLayoutId();/** * @return 能否移动或者触摸响应 */protected abstract boolean canMoveOrTouch();/** * 初始化悬浮控件 */protected abstract void initFloatView();/** * 初始化监听 */protected abstract void initListener();/** * @return 设置悬浮框是否吸附在屏幕边缘 */protected abstract boolean isAdsorbView();
点击查看示例代码FloatWindowPermission.getInstance().applyFloatWindowPermission(getContext());
关键词:实现,方案,悬浮,简易