How to make any view background transparent?

前端 未结 7 1498
慢半拍i
慢半拍i 2021-02-14 06:45

Attribute of RelativeLayout android:background=\"@android:color/transparent\" is not working . I just want to make its background transparent?

7条回答
  •  梦谈多话
    2021-02-14 07:27

    you can also set it in your java file like this:

     view.setBackgroundColor(Color.TRANSPARENT);
    

提交回复
热议问题