Tab with icon using TabLayout in Android Design Library

后端 未结 3 2019
北荒
北荒 2021-02-06 01:29

I\'m trying to use the new TabLayout in the android design library to create app bar with icons only.

like this: \"

3条回答
  •  天命终不由人
    2021-02-06 01:40

    I used it like this: created an xml file in drawable as shown by @Budius.

    in the code: tabLayout.getTabAt(0).setIcon(R.drawable.settings_tab_drawable);

    and so on.

提交回复
热议问题