Android small counter next to a button

前端 未结 3 979
情歌与酒
情歌与酒 2021-02-10 15:46

I would like to add a small counter next to a button to show the remaining quantity for some items, for example, the remaining number of tips remaining unused. Targeted layout w

3条回答
  •  心在旅途
    2021-02-10 16:48

    I suggest you can use a FrameLayout. 1.- you can use 2 images one for your button, one for the little circle and use a textview for the numbers... 2.- you can use one image for your button, and create a gradient for the little circle and a text view..

    For the frameLayout see :http://developer.android.com/reference/android/widget/FrameLayout.html For the gradient see: How to make gradient background in android.

提交回复
热议问题