How to remove system bars on Android, I mean, all

前端 未结 4 830
南旧
南旧 2021-01-26 00:59

I\'m pretty new with Android programming, started a few weeks ago. Stackoverflow it\'s my new best fried since android day 1. For the 1st time, I would like to actually ask for

4条回答
  •  野的像风
    2021-01-26 01:15

    I don't think you can hide that since that would be equivalent to hiding the hard buttons on other devices. What you could do is handle their presses.

            @Override
        public boolean onKeyDown(int keyCode, KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_BACK) {
               // do something
                return true;
            } else if (keyCode==KeyEvent.KEYCODE_HOME){
      //do something
    return true;
        }
            return super.onKeyDown(keyCode, event);
        }
    

提交回复
热议问题