相关文章推荐
行走的消防车  ·  RV 的 scrollToPosition ...·  4 月前    · 
腹黑的豆浆  ·  Oracle函数之 ---- ...·  2 年前    · 
慷慨的黄瓜  ·  android ...·  2 年前    · 
安静的小刀  ·  开发和部署 Oracle 和 PHP·  2 年前    · 

[TabLayout] setHeight(or setSize) for TabItem's BadgeDrawable ? #797

@lutics

Description

Hello

How can I set height(or size) for BadgeDrawable in TabLayout ?

        TabLayoutMediator(view.tabLayout, view.viewPager, TabLayoutMediator.TabConfigurationStrategy { tab, position ->
            tab.orCreateBadge.apply {
                backgroundColor = Color.parseColor("#db635d")
                horizontalOffset = -10
            tab.text = when (position) {
                0 -> "주문 내역"
                1 -> "받은 선물"
                else -> null
        }).attach()

expected

but I've got

Screenshot_2019-11-28-14-22-47