What is the best way to find out the number of Tabs in a TabActivity?

Viewed 5444

I create tabs dynamically in a TabActivity. Is there a simple way to ask for the number of existing Tabs?

3 Answers
    TabLayout tabLayout = findViewById(R.id.tabs);
    int totalTabs = tabLayout.getTabCount();
Related