How to add image for button in android?

前端 未结 9 1062
再見小時候
再見小時候 2021-02-02 06:44

How can I add an image to a button, rather than text?

9条回答
  •  清酒与你
    2021-02-02 07:23

    You can create an ImageButton in your android activity_main.xml and which image you want to place in your button just paste that image in your drawable folder below is the sample code for your reference.

    
    

提交回复
热议问题