change button text color when pressed

后端 未结 5 1258
情歌与酒
情歌与酒 2021-02-02 15:53

I have made my button transparent so I would like to have the button text color change when the button is pressed. Is it possible to do this using just xml files?

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-02 16:28

    You must set @drawable xml resource in textColor attributte

    Here is example: Android customized button; changing text color

提交回复
热议问题