This is my next extension for the community. With this extension, you can create lightweight widgets from your aphere is a simple example of what it is and how it can be used,have control over it, the ability to move.
of course, for such an operation you need permission: android.permission.SYSTEM_ALERT_WINDOW
The required permission has already been inserted into the extension
I can’t answer exactly what Google Market’s relationship is to this permission. it is not considered dangerous, but it should be clarified. write about it in the comments. I’m interested. So let’s go on the application of the extension.:
creates an overlay as a component. you should specify gravity, displacement (if necessary) and indicate whether it will be possible to move the created overlay with your finger. yes, I have added a touch listener that will be responsible for moving. however, it is not updated so often, and therefore if the label is updated frequently, the listener will not be able to process it. in such cases, it should be placed in larger parent layouts.
A lyout can take on various components. such as button, label, text HVArguments
closing the overlay
we can move the overlay across the screen to any coordinates.
(it is not related to the flag in the creation of “canMove”. in those cases, it is indicated whether the user can move with his finger.
this feature is available in any case)
this is the first thing to run. it will automatically check the permission and, if successful, will give the Status message in the event: “Overlay permission already granted”
This function brings the application back to the foreground
(if you have moved your application to the background, it is convenient to bring your application back to the foreground)
these functions return the actual size of the component
these functions return the actual screen size
these blocks indicate the gravity of the overlay on the screen
the event reflects the results of the action. current messages and current overlay coordinates
download
Overlay.aix (12.8 KB)
Overlay_v2.aix (13.2 KB)
example:
TEST3.apk (4.3 MB)
Overlay_Example.aia (50.2 KB)
I forgot to add that it will not work in the editor because there is no necessary permission in its manifest
added to version 2:
added the overlay transparency feature. values from 0 to 1. (0 is completely transparent, 1 is completely opaque)