Remove background drawable programmatically in Android

前端 未结 11 1490
忘掉有多难
忘掉有多难 2020-12-07 17:17

I want to remove the background drawable @drawable/bg programmatically. Is there a way to do that?

Currently, I have the following XML in my layout:

11条回答
  •  有刺的猬
    2020-12-07 17:55

    This helped me remove background color, hope it helps someone. setBackgroundColor(Color.TRANSPARENT)

提交回复
热议问题