Android Question App stay on the top of the other app

cambopad

Active Member
Licensed User
Longtime User
Does anyone know how to make an app to stay on the top of the other apps. For example, a note app that shows the note on the top of the other apps, and you can still interact with the those app.

I did search on Google and then found the following code written in Java.

It would be great if someone could translate it into B4A code as I myself know nothing about Java.


final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT);

WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE);

ViewGroup mTopView = (ViewGroup) App.inflater.inflate(R.layout.main, null);
getWindow().setAttributes(params);
wm.addView(mTopView, params);
 

barx

Well-Known Member
Licensed User
Longtime User
Search forum for standout then wait for v2 if it's not already released...
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top