Android 在TabHost中具有小写标题
我已经从下面的代码中实现了Android 在TabHost中具有小写标题,android,android-tabhost,Android,Android Tabhost,我已经从下面的代码中实现了Tabhost,默认情况下标题似乎是大写的。如何在Tabhost中放置小写标题 下面是我的Tabhost实现代码 TabHost tabHost =getTabHost() ; // Tab for public TabHost.TabSpec publiComp = tabHost.newTabSpec("Public"); publiComp.setIndicator("Public"); Intent pub
Tabhost
,默认情况下标题似乎是大写的。如何在Tabhost
中放置小写标题
下面是我的Tabhost
实现代码
TabHost tabHost =getTabHost() ;
// Tab for public
TabHost.TabSpec publiComp = tabHost.newTabSpec("Public");
publiComp.setIndicator("Public");
Intent publicIntent = new Intent(this, CompliancePublic.class);
publiComp.setContent(publicIntent);
// Tab for private
TabHost.TabSpec privateComp = tabHost.newTabSpec("Private");
privateComp.setIndicator("Private");
Intent privateIntent = new Intent(this, CompliancePrivate.class);
privateComp.setContent(privateIntent);
tabHost.addTab(publiComp);
tabHost.addTab(privateComp);
试试这个
mTabHost = (FragmentTabHost) view.findViewById(android.R.id.tabhost);
mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
View tabIndicatorToday = LayoutInflater.from(getActivity()).inflate(R.layout.tab_indicator, mTabHost.getTabWidget(), false);
((TextView) tabIndicatorToday.findViewById(R.id.tv_tab_txt)).setText(getResources().getString(R.string.text));
mTabHost.addTab(mTabHost.newTabSpec(getResources().getString(R.string.text)).setIndicator(tabIndicatorToday), Fragment.class, null);
并为您的
文本视图提供您自己的风格
试试tabhost和tablayout的过程是否相同@SuryaPrakashKushawahtry如何使用TabHost
的自定义视图?能否举例说明@逻辑