15.9k views
1 vote
An icon can be specified for a tab using the _____ method.

addTab
setIcon
setImage
tabIcon

User Kimon
by
4.9k points

1 Answer

5 votes

Answer:

setIcon

Step-by-step explanation:

In design support library the components like nav bar, floating action button, snackbar, tabs, labels and animation frameworks we use icons and different other designs to look theme appealing.

So the icon can be specified for a tab using the setIcon method.

tabLayout.getTabAt(0).setIcon(tabIcons[0]);

tabLayout.getTabAt(1).setIcon(tabIcons[1]);

User PC Luddite
by
4.9k points