Tab widget have always in capital alphabets in and

2020-02-10 04:23发布

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

2条回答
女痞
2楼-- · 2020-02-10 04:58

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

查看更多
手持菜刀,她持情操
3楼-- · 2020-02-10 05:00

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);  
查看更多
登录 后发表回答