Opposite to FLAG_LAYOUT_NO_LIMITS

Viewed 608

I have made a transparent status bar with

android:fitsSystemWindows="true"
getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

How do i get back to default state.?

1 Answers

You can unset the flags by using clearFlags() as following :

KOTLIN

var win:Window = requireActivity().window
win.clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS)

JAVA

getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
Related