How can I customize background drawable of TabWidget?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How can I customize background drawable of TabWidget?

Postby silverburgh.meryl » Wed Mar 11, 2009 6:49 am

Hi,

In this TabHost example,

http://developer.android.com/guide/tuto ... idget.html

Can you please tell me if I can customize background drawable of TabWidget, not the tab, but the TabWidget itself?
If yes, how can i do that?

Thank you.
silverburgh.meryl
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sun Feb 08, 2009 11:17 pm

Top

Postby dragoff » Wed Mar 11, 2009 9:34 am

If you want to put some drawable to the tab indicator, use setIndicator("TAB 1", yourDrawable), where yourDrawable is Drawable.
dragoff
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Feb 04, 2009 2:34 pm
Location: Odessa, Ukraine

Re: How can I customize background drawable of TabWidget?

Postby StephenLe » Thu Mar 12, 2009 8:20 am

silverburgh.meryl wrote:Hi,

In this TabHost example,

http://developer.android.com/guide/tuto ... idget.html

Can you please tell me if I can customize background drawable of TabWidget, not the tab, but the TabWidget itself?
If yes, how can i do that?

Thank you.


And i have a questions for TabHost...If you added more than 4 tabs in the host container...How can I make the Tab's character smaller but don't change line..I have droped in this a long time....
User avatar
StephenLe
Freshman
Freshman
 
Posts: 5
Joined: Thu Mar 12, 2009 7:55 am
Location: Beijing China

Postby dragoff » Thu Mar 12, 2009 9:10 am

You should try to use search. At first attempt http://www.anddev.org/viewtopic.php?p=18799
dragoff
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Feb 04, 2009 2:34 pm
Location: Odessa, Ukraine

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests