Window overlay with accessibility services is easy. I know this is an old question, but I thought I would add the answer anyway.
RelativeLayout relativeLayout = new RelativeLayout(getContext()); WindowManager.LayoutParams topButtonParams = new WindowManager.LayoutParams( width,
Also, you need this permission in the manifest
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
After you impose an invisible relative layout on top of the entire page, adding views to it is easy!
source share