[問題] 該如何隱藏Navigation bar(海苔條)
最近想把APP的畫面做到全銀幕
但是很多裝置的Navigation bar都直接吃掉一排
看過官方的developer的寫法:
View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but
as
// a general rule, you should design your app to hide the status bar whenever
you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
這方法有效,但只要一碰觸到畫面
Navigation bar就會再浮現出來
請問該如何將固定不要讓它跑出來?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.134.22.57
※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1441070970.A.EB9.html
→
09/01 11:39, , 1F
09/01 11:39, 1F
→
09/04 01:55, , 2F
09/04 01:55, 2F
推
09/05 02:24, , 3F
09/05 02:24, 3F
→
09/05 02:24, , 4F
09/05 02:24, 4F