Tooleapp functionality

vpires

Member
Licensed User
Longtime User
Does anyone knows how tooleapp does is magic ? I've played a little with the windowsManager layout params of our ba activity, and can get a floating window and still interact with the under activity, but as soon as i start a new one, the ba goes out of screen.

B4X:
public void Initialize(BA ba) {
        WindowManager.LayoutParams params = ba.activity.getWindow().getAttributes();
       
       
        params.x = 10;
        params.y = 10;
        params.width = 100;
        params.height = 100;
       
        params.gravity=Gravity.TOP | Gravity.LEFT;   
        params.format = PixelFormat.TRANSLUCENT;
        params.type = WindowManager.LayoutParams.TYPE_PHONE;
        //params.flags= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
        params.flags= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
       
       
        ba.activity.getWindow().setAttributes(params);   
    }

if it was a service, then i could keep it the foreground. But they are doing it with a activity. I'm curious how it's that possible.
 

DonManfred

Expert
Licensed User
Longtime User
have you seen this class?
 
Top