Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在TabHost中具有小写标题_Android_Android Tabhost - Fatal编程技术网

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
的自定义视图?能否举例说明@逻辑