CompoundDrawable size

后端 未结 6 2044
臣服心动
臣服心动 2020-12-08 14:32

Android-Lint gives me this hint in some cases:

This tag and its children can be replaced by one and a compound drawable

I cou

6条回答
  •  天命终不由人
    2020-12-08 15:16

    If you scale the images in code as Drawable objects, you can then set them in code using the setCompoundDrawables() method of TextView. This will require having called setBounds() on the Drawables.

    As far as I know there is no way to set the size in XML.

提交回复
热议问题