Would someone explain me the role of flags in functions like setFlags? What exactly does this word mean in that situation...?
My example is
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(new RenderView(this));
}
I'd like to know what is setFlags used for?
I've read the API documentation, but I haven't understood that.
Simply think of flags as features that you're applying to the object (in this case to the object Window
), and they are represented as integers. You can apply the flags using the final variables in Window
and WindowManager.LayoutParams
.
setFlags
replaces current flags.
addFlags
appends more flags and does not replace the current ones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With