将translucant添加到状态栏时的间隙未知

时间:2016-03-18 10:15:23

标签: android android-statusbar

当我保持半透明状态时,工具栏下会出现意外间隙。

不应用半透明: With out applying translucent

private void _setStatusbarTranslucent() {
  // Set the status bar to dark-semi-transparentish
  // here if used _context, getting nullpointer unable to find .getWindow() while accessing camera/ gallery to pick photo
  getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}

为什么会发生这种情况,我该如何解决?

0 个答案:

没有答案