Creating a system overlay window (always on top)

前端 未结 16 1452
南方客
南方客 2020-11-21 07:07

I\'m trying to create an always-op-top button/clickable-image which stays on top of all the windows all the time.

The proof of concept is

  • here - Smar
16条回答
  •  天命终不由人
    2020-11-21 07:23

    Well try my code, atleast it gives you a string as overlay, you can very well replace it with a button or an image. You wont believe this is my first ever android app LOL. Anyways if you are more experienced with android apps than me, please try

    • changing parameters 2 and 3 in "new WindowManager.LayoutParams"
    • try some different event approach

提交回复
热议问题