Changing tint color of Android EditText programmatically

后端 未结 5 662
孤城傲影
孤城傲影 2021-02-03 22:07

I am trying to change the tinting color of an EditText View programmatically during runtime. Basically i want to change what you would usually apply as ?attr/

5条回答
  •  走了就别回头了
    2021-02-03 22:55

    Try to create a custom EditText and add this.setBackgroundTintList( ColorStateList.valueOf( color ) ); into constructor.

提交回复
热议问题