add View by using WindowManager, but can back key press

前端 未结 3 1908
北荒
北荒 2021-01-03 07:08

I\'ve add a View, by using WindowManager.

It shows properly what I wanted to do,

but I have a problem. this is the problem.

  • back key press does
3条回答
  •  孤城傲影
    2021-01-03 07:38

    Have your View override

    public boolean dispatchKeyEvent(KeyEvent event) 
    

    to do something when back is pressed.

提交回复
热议问题