Display a view using windowmanager on lock screen

后端 未结 3 2007
梦毁少年i
梦毁少年i 2021-02-01 09:29

I have a float icon that stays on top of all activities, but when the device get locked it disappear until the device get unlocked.

Another meaning, I want to display a

3条回答
  •  借酒劲吻你
    2021-02-01 09:56

    Use WindowManager.LayoutParams.TYPE_SYSTEM_ERROR instead of WindowManager.LayoutParams.TYPE_PHONE that will solve the issue. This will make the view able to listen to touch events,. However you can use WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY also but it wont listen to touch events

提交回复
热议问题