TabLayout update tab content with a custom view

后端 未结 4 1046
悲&欢浪女
悲&欢浪女 2021-02-01 03:48

I\'m using TabLayout of the new material design and i have a problem, i can\'t update tab content of a custom view once the tab is created:

I can simplify m

4条回答
  •  死守一世寂寞
    2021-02-01 04:53

    please check my code working fine for me

    TabLayout.Tab tab=tabLayout.getTabAt(position);         
    View view=tab.getCustomView();         
    TextView txtCount= (TextView) view.findViewById(R.id.txtCount);         
    txtCount.setText(count+"");
    

提交回复
热议问题