Android Gradient Application Title Bar [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How do I programmatically set the background color gradient on a Custom Title Bar? I want to use gradient color in application title bar. How can I do it? Thanks in advance. 回答1: All people are trying to use Custom title for this requirement. I achieved this without using custom title. Just use below code in your activity's onCreate() after setContentView(). GradientDrawable gd = new GradientDrawable