What does requestWindowFeature()
do? I used it to create a custom titlebar, but I don't really understand what its purpose is.
The explanation provided in the SDK documentation here does not make sense.
Each activity has an associated window (on which the whole UI draws). This window has default way of being drawn (whether toolbar, actionbar, icons are drawn or not).
However, you can use requestWindowFeature
to ask the system to include or exclude some of windows features (toolbar, actionbar and so on).
Here you can find the full list of supported features: http://developer.android.com/reference/android/view/Window.html
As example, you can use FEATURE_NO_TITLE
to make a window full screen or FEATURE_RIGHT_ICON
to let system know that icon should be drawn on the right side.
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