我想将导航栏设置为三点外观,例如:
Android Developers网站显示了如何完全删除导航栏(全屏模式),但未显示如何启用此模式。
我该怎么做?
答案 0 :(得分:3)
请参阅此document。
基本上,在onCreate
setContentView
中调用此方法
// This example uses decor view, but you can use any visible view.
View decorView = getActivity().getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;
decorView.setSystemUiVisibility(uiOptions);
当您需要以编程方式显示条形图时,请清除以下标记:
View decorView = getActivity().getWindow().getDecorView();
// Calling setSystemUiVisibility() with a value of 0 clears
// all flags.
decorView.setSystemUiVisibility(0);