答案 0 :(得分:1)
{{1}}
答案 1 :(得分:0)
您可以这样做:
LinearLaout tabone= (LinearLaout ) LayoutInflater.from(this).inflate(R.layout.custom_tab, null);
TextView txtView= (TextView) tabone.findViewById(R.id.txtview);
txtView.setText("ONE");
TextView txtCount= (ImageView ) tabone.findViewById(R.id.txtcount);
txtCount.setText("200")//Count
/*Also don't forgot to add background of count textview in xml according to your design.*/
tabLayout.getTabAt(0).setCustomView(tabone);
就是这样!!
答案 2 :(得分:0)