Tab widget have always in capital alphabets in android 4.0
Asked Answered
H

2

11

enter image description hereIn Android 4.0 i put tab bar with two widget. in code i write in small alphabates(new) but in application it should always display (NEW) How to write small alphabates on tab in android 4.0

Hireling answered 31/3, 2012 at 5:20 Comment(0)
U
12

The default theme for tab views in Android 4.0 (the Holo theme) has android:textAllCaps set to true. You can create your own theme and then apply it to the action bar in your manifest to override this behavior. For more information on styling the ActionBar and creating your own styles, see:

http://developer.android.com/guide/topics/ui/themes.html and http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

Unsuspecting answered 4/4, 2012 at 7:4 Comment(0)
M
20

Theres no need to create custom theme

In source code..

   TextView tv =  (TextView) mTabHost.getTabWidget().getChildAt(index).findViewById(android.R.id.title); 
   tv.setAllCaps(false);  
Moonmoonbeam answered 5/7, 2012 at 8:44 Comment(2)
setAllCaps() is not available in android 2.x, this solution will not work there.Arm
@Arm Well, TABS are not available in android 2.x so this entire question is relevant only for Android 3+. In case you are using ActionBarSherlock or ActionBarCompat library the similar approach is applied there.Ats
U
12

The default theme for tab views in Android 4.0 (the Holo theme) has android:textAllCaps set to true. You can create your own theme and then apply it to the action bar in your manifest to override this behavior. For more information on styling the ActionBar and creating your own styles, see:

http://developer.android.com/guide/topics/ui/themes.html and http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

Unsuspecting answered 4/4, 2012 at 7:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.