Display custom title bar for Android with XML
        Posted  
        
            by Casebash
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Casebash
        
        
        
        Published on 2010-04-28T01:01:53Z
        Indexed on 
            2010/04/28
            4:03 UTC
        
        
        Read the original article
        Hit count: 1083
        
In Android documentation describing "Configuring General Window Properties", it is suggested that specifying properties via XML is preferable whenever possible to avoid seeing the title bar flash. As an example, instead of setting Window.FEATURE_NO_TITLE with requestWindowFeature, they set it to @android:style/Theme.NoTitleBar. Is there a similar way to set a custom title bar to be used in the XML?
Update:
I just found this article, according to which this article, the best way to draw a title bar is to ignore FEATURE_CUSTOM_TITLE and instead just draw the title bar as part of your main view. This would not only avoid the flashing, but also problems caused by padding.
© Stack Overflow or respective owner