TabLayout标签文本不显示
我TabLayout在a内部使用它Fragment来显示三个固定的选项卡,并且这些选项卡都在工作,但是即使我app:tabTextColor在布局中设置了属性后,它仍然不可见,它也没有显示选项卡文本。 NewFragment.java public class NewFragment extends Fragment { private RecyclerView mRecyclerView; private RecyclerView.LayoutManager mLayoutManager; private RecyclerView.Adapter mAdapter; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View inflatedView = inflater.inflate(R.layout.new_fragment, container, false); TabLayout tabLayout = (TabLayout) inflatedView.findViewById(R.id.tabLayout); tabLayout.addTab(tabLayout.newTab().setText("Tab 1")); tabLayout.addTab(tabLayout.newTab().setText("Tab 2")); tabLayout.addTab(tabLayout.newTab().setText("Tab 3")); final ViewPager viewPager = (ViewPager) inflatedView.findViewById(R.id.viewpager); …