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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
requestWindowFeatureto 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_TITLEto make a window full screen orFEATURE_RIGHT_ICONto let system know that icon should be drawn on the right side.