Problem with EditText background (android)

后端 未结 8 1486
执笔经年
执笔经年 2020-12-09 00:14

I have a problem with EditText background like this



        
8条回答
  •  Happy的楠姐
    2020-12-09 00:24

    If you wish to edit the color of the Android background on the fly without changing the background image completely, try the following: (it is probably not the best solution but it works):

    YourEditText.getBackground().setColorFilter(getResources().getColor(R.color.your_color), PorterDuff.Mode.MULTIPLY);
    

提交回复
热议问题