我正在使用 FragmentTabHost 将框架保存为标签。我想删除蓝色下划线吹标签。这个怎么做。
public class MainMenuFragment extends Fragment {
private FragmentTabHost mTabHost;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main_menu, container, false);
// Locate android.R.id.tabhost in main_fragment.xml
mTabHost = (FragmentTabHost) rootView.findViewById(android.R.id.tabhost);
// Create the tabs in main_fragment.xml
mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.tabcontent);
// Create Tab1 with a custom image in res folder
mTabHost.addTab(mTabHost.newTabSpec("tab1").setIndicator("Appetizers"),
AppetizersMenuFragment.class, null);
// Create Tab2
mTabHost.addTab(mTabHost.newTabSpec("tab2").setIndicator("Entrees"),
EntreesMenuFragment.class, null);
// Create Tab2
mTabHost.addTab(mTabHost.newTabSpec("tab3").setIndicator("Desserts"),
DessertsMenuFragment.class, null);
return rootView;
}
}