How to Hide System Navigation Bar in Tablets?

后端 未结 9 1641
一整个雨季
一整个雨季 2020-11-27 04:13

At my Tablet, it has following bar to control back, home etc. (I don\'t know the correct name, status bar? control bar? Action bar? or other)

In program, it use foll

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-27 05:02

    Since the system bar is used to navigate in android there is not an easy way to achieve this, you can dissable/dim the controls:

    View v = findViewById(R.id.view_id);
    v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
    

    But you can get the size of the screen without the systembar (not sure from what version, I think 3.1)

    Method rawW = Display.class.getMethod("getRawWidth");
    Method rawH = Display.class.getMethod("getRawHeight");
    int width = (Integer)mGetRawW.invoke(dp);
    int height = (Integer)mGetRawH.invoke(dp);
    

    If your app has root access there is also a way to achieve it: http://ppareit.github.com/HideBar/

提交回复
热议问题