Android button background color

后端 未结 10 1892
轮回少年
轮回少年 2020-12-08 00:25

I am trying to set the background color of a button in my app and I am unable to achieve the result that I want...

The color that I am trying to set is holo_gr

10条回答
  •  时光说笑
    2020-12-08 00:57

    Why not just use setBackgroundColor(getResources().getColor(R.color.holo_light_green))?

    Edit: If you want to have something which looks more like an Android button you are going to want to create a gradient and set it as the background. For an example of this, you can check out this question.

提交回复
热议问题