Android Title Bar Background Color Problem!

Put your problem here if it does not fit any of the other categories.

Android Title Bar Background Color Problem!

Postby mr_muskuraha » Tue Mar 09, 2010 12:32 pm

dear friends,

i want to give color to android title bar of my choice

i have use SetTitleColor property but it changes color of text written on title.

can any one guide me how can i change color of gray title bar which is by default color of android application to my custom color?


any help would be appriciated.
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Top

Postby Draffodx » Tue Mar 09, 2010 12:40 pm

You have to create a custom title bar I think.

see here - StackOverflow - Set Title Background Color
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

ok

Postby mr_muskuraha » Tue Mar 09, 2010 12:43 pm

in order to change the color of title bar i need to create it custom??
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Postby Draffodx » Tue Mar 09, 2010 12:48 pm

It would appear so.

Here is another link that may be helpful - Anddev.org - My Own Titlebar
Draffodx
Master Developer
Master Developer
 
Posts: 205
Joined: Wed Nov 12, 2008 2:31 pm

ok

Postby mr_muskuraha » Tue Mar 09, 2010 1:36 pm

thank you very much for your support.
mr_muskuraha
Senior Developer
Senior Developer
 
Posts: 142
Joined: Wed Jan 13, 2010 8:49 am

Re: Android Title Bar Background Color Problem!

Postby tushar_288 » Thu Jan 19, 2012 7:01 am

View title = getWindow().findViewById(android.R.id.title);
View titleBar = (View) title.getParent();
titleBar.setBackgroundColor(Color.CYAN);

Tushar.
tushar_288
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Jan 19, 2012 6:58 am

Top

Re: Android Title Bar Background Color Problem!

Postby Phyll » Thu Jan 19, 2012 12:28 pm

Hi All,

I've been doing it something like this in the on create:

Code: Select all
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);       
        setContentView(R.layout.main);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);


You can do (more or less) anything you want with the one line Title bar through your custom_title. Put Textviews in this xml layout to show title text(s) and change the background color here too.

Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Android Title Bar Background Color Problem!

Postby hgft » Wed Feb 29, 2012 9:06 am

Coach Outlet Online Sale is with imperfections which consist of cuts, scars, and scratches will exist, the grain in its organically grown problem has between one of the most considerable dietary fibers strength, and getting a last end result between one of the most considerable durability. The grain also has organically grown breathability, resulting in increased comfort using the path from the wearer.

Louis Vuitton Outlet could possibly be one of the most well-known is not necessarily one of the most ideal for you! possibly the most current quarter round shoulder bag with fluorescent color provides you a shine in the moment, desire to possess the urge to it immediately; But possibly your pores and skin color could possibly be the earth beside the handbag could possibly be one of the most make you fondle admiringly joker choice.

Louis Vuitton Outlet supply reduce, the weakening from the role, tiny haystack in slender whole body once more and again. the right way to purchase Louis Vuitton bags That's between the powerful cohesion when Cunningham lancelet find yourself isolated point, allow wind and bad weather insulation, yr pursuing year, pile of grass system earlier short increased grass blanketed with it or bi erosion.

Jennifer Garner and Ben Affleck are the proud parents of a newborn son! The 39-year-old actress gave birth to the couple's third child in Santa Monica, Calif., a source tells Us Weekly. The family's newest addition joins older sisters Violet, 6, and Seraphina, 3. “I would have thought [Ben] wanted a boy]. At first … I really thought so,” Jen, who kept the baby's gender under wraps, told Jay Leno last month.
hgft
Experienced Developer
Experienced Developer
 
Posts: 66
Joined: Tue Feb 28, 2012 9:11 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 18 guests