I have a TabLayout and inside that I have ViewPager. I need to dynamically add and remove tab in tablayout(material design). I can able to add the tabs dynamically but while
You can add dynamic tabs like this :
public void addTabs(){ for(YourClassModel tabName: tabsName){ Log.i("ActivityClass","tabName"+tabName); tabLayout.addTab(tabLayout.newTab().setText(tabName.getName())); }