0

当我保持半透明时,工具栏下会出现一个意想不到的间隙。

不应用半透明: 不应用半透明

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);
}

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

4

0 回答 0