How to make button non transparent?

后端 未结 6 1307
南笙
南笙 2020-12-31 04:10

I wrote custom View which draws a circle. Then I put it on relative layout. Also I put standard button there, so that they overlap. And I see that button is transparent. How

6条回答
  •  别那么骄傲
    2020-12-31 04:34

    I was with the same problem but with ToggleButton. A ugly but fast solution was to position a ImageView right behind the button and change its margins, background and alpha to fit the button. For example, inside a RelativeLayout:

    
    
    
    

    And, in an effort to reduce the visible hack, the extracted style:

    
    

提交回复
热议问题