Android TabWidget in Light theme

前端 未结 4 1793
生来不讨喜
生来不讨喜 2021-02-09 17:00

I have an application that targets the 1.5 framework and uses the default light theme. When using a tab widget with this theme, the tab images are barely visible, and the tab ca

4条回答
  •  清酒与你
    2021-02-09 17:20

    By using the hierarchyviewer tool I found the android id for the textview in the tab. A better way to change the text properties (including color) is by doing the following...

    TabWidget tw = (TabWidget)tabHost.findViewById(android.R.id.tabs);
    View tabView = tw.getChildTabViewAt(0);
    TextView tv = (TextView)tabView.findViewById(android.R.id.title);
    tv.setTextSize(20);
    

提交回复
热议问题