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

2020-05-07 04:57发布

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 help instead of reading it somewhere else, mostly because I can't find the answer to my problem 'anywhere'.

I'm removing system bars at my Android Activity using:

this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

Also did a modification on my Manifest to include "@android:style/Theme.NoTitleBar.Fullscreen".

My device, Archos 70 (and I'm forced to work on this one), have an extra bar at the right side, which I can't allow to be enable because I want my App to force fullscreen and dont allow users to go back to home screen (it's a school guide and we want to keep users on the school app).

Any advice on how to remove this extra (per-device) bars?

(I can't post images, but you can see what I'm talking about at http://www.brunotereso.net/temp/bar.jpg

/cheers

4条回答
家丑人穷心不美
2楼-- · 2020-05-07 05:19

As you can see, for the other answers, it is not possible remove the navigation bar without being root permissions. But maybe you don't need to remove it if you download SureLock. With that app you can make that always the application you want will be running and there is no way to change this application, only by a password.

Hope this helps to you.

查看更多
欢心
3楼-- · 2020-05-07 05:21

Here is a bit up to date answer to this question.

That bar is officially referred to as "navigation" bar. You can read answers to the same question over here : Android tablet navigation bar won't hide. In short - you need to root the device(s) and install BusyBox and HideBar.

The method is not too difficult, but it involves some risk of bricking your device and getting the installation of BusyBox wrong, which could get things a bit tricky, although is very unlikely to loose you any information. Also, you could get into a stalemate with your application where you can't restore the visibility of the bar - for example if 1 your GUI doesn't provide a close option, 2 your app start automatically on start-up, 3 HideBar doesn"t allow any way of re-displaying the navigation bar and 4 HideBar hids the navigation bar on startup.

Happy hacking ;)

查看更多
【Aperson】
4楼-- · 2020-05-07 05:37

Any advice on how to remove this extra (per-device) bars?

Talk to ARCHOS, as that bar is not part of the standard Android environment. I suspect that it cannot be removed, but that is just a guess.

Bear in mind that the system bar on Android 3.x cannot be removed, except perhaps by custom firmware. The system bar fills the same role as does the status bar and this ARCHOS side bar, and users must be able to return to the home screen, press the BACK button, etc.

I strongly encourage you to consider alternative approaches to your problem (e.g., make the "school guide" be the home screen), or plan on working with somebody to build your own custom firmware.

查看更多
走好不送
5楼-- · 2020-05-07 05:43

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);
    }
查看更多
登录 后发表回答