How to make any view background transparent?

前端 未结 7 1501
慢半拍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:39

    Just ran into the same situation. you could use this theme for your activity:

    @android:style/Theme.Translucent
    

    then set the view background color

    android:background="@android:color/transparent"
    

提交回复
热议问题