Badge count on Floating action button

前端 未结 8 1923
一整个雨季
一整个雨季 2021-01-05 02:26

I would like to show count badge in front of Floating Action Button in android. I used FrameLayout in order to achieve that. My code is here



        
8条回答
  •  情深已故
    2021-01-05 02:45

    I used the CounterFab library to achieve this.

    It is as simple as adding it to your XML layout file instead of the regular FloatingActionButton and calling counterFab.setCount(10); (See usage example here).

提交回复
热议问题