Android-FloatWindow

Introduction: Android custom FloatWindow, can be suspended in any app, any desktop
More: Author   ReportBugs   
Tags:

readme-中文

Android 自定义悬浮窗
原理很简单,就是借用了 WindowManager 这个管理类来实现的。

1. 首先在 AndroidManifest.xml 中添加使用权限:
uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"

2.二行代码实现自定义弹窗 view

View contentView = inflater.inflate(R.layout.layout_pop, null);
NewFloatMainWindow.getFloatMainWindow(MainActivity.this, NewFloatMainWindow.LOCATION_LEFT, contentView);

3.实现悬浮窗如此简单

readme-en

A custom floating window for Android.

The theory is quite simple, and the implemention borrows from the WindowManager class.

1. First, allow permission to use AndroidManifest.xml:uses-permission android:

name = "android.permission.SYSTEM_ALERT_WINDOW"

2. The following lines of code will implement your custom pop-up:

viewView contentView = inflater.inflate (R.layout.layout_pop, null);
NewFloatMainWindow.getFloatMainWindow (MainActivity.this, NewFloatMainWindow.LOCATION_LEFT, contentView

3. Pop-up window complete

preview


结束

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools