Android : ugly TABS in 2.0 vs 1.5 ... why ? where are my rounded corners TABS ?
Posted
by Hubert
on Stack Overflow
See other posts from Stack Overflow
or by Hubert
Published on 2010-02-27T06:10:33Z
Indexed on
2010/03/18
9:01 UTC
Read the original article
Hit count: 532
I simply use the tabwidget :
mTabHost = getTabHost();
mTabHost.addTab(mTabHost.newTabSpec("tab_1").setIndicator(getString(R.string.day0)).setContent(R.id.tab1_content));
mTabHost.addTab(mTabHost.newTabSpec("tab_2").setIndicator(getString(R.string.day1)).setContent(R.id.tab2_content));
mTabHost.addTab(mTabHost.newTabSpec("tab_3").setIndicator(getString(R.string.day2)).setContent(R.id.tab3_content));
mTabHost.addTab(mTabHost.newTabSpec("tab_4").setIndicator(getString(R.string.day3)).setContent(R.id.tab4_content));
mTabHost.addTab(mTabHost.newTabSpec("tab_5").setIndicator(getString(R.string.about)).setContent(R.id.tab5_content));
mTabHost.setCurrentTab(0);
Why are my tabs so uggly in 2.0 (no more rounded corners as in 1.5/1.6) ?
=>
What should I do now to show "rounded corners" TABS to Nexus One (for exemple) users ;-) ?
Is it because of the following manifest lines :
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="4" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />
I have to keep android:anyDensity="true" otherwise I've got a problem with re-sizing of the menus described here
As a separate question, my users can change the Locale within my app itself, I then "redraw" the menus using onPrepareOptionsMenu (Menu menu) to refresh the strings within the menu with the new language choosen by the user. Is there an equivalent for TABS (I have local strings within the Title of the TABS) or do I have to delete all the tabs and re-create them from scratch ?
Txs in advance for your help.
Hub
© Stack Overflow or respective owner