How to add image(left) and text on button

后端 未结 3 1661
天命终不由人
天命终不由人 2021-02-03 23:02

How to add image(left) and text on button?


For illustration:

\"enter

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-03 23:50

    We can also manage the size of drawable while doing programmatically

    Drawable dr = getResources().getDrawable(R.drawable.mag_green);
    dr.setBounds(0, 0, 43, 40); //Left,Top,Right,Bottom
    search_bar.setCompoundDrawables(dr, null , null , null);
    

提交回复
热议问题