Android EditText Transparent Background

前端 未结 11 1736
天涯浪人
天涯浪人 2020-12-05 09:33

I want to have a transparent background for Android EditText widget. How is that possible?

相关标签:
11条回答
  • 2020-12-05 09:56

    Very simple:

    android:alpha="0.5"
    
    0 讨论(0)
  • 2020-12-05 09:59

    set this in layout will work

    android:background="@color/transparent
    

    and add this in colors.xml

    <color name="transparent">#00000000</color>
    
    0 讨论(0)
  • 2020-12-05 10:00
    android:background="@android:color/transparent"
    
    0 讨论(0)
  • 2020-12-05 10:03

    Try this

    android:background="@null"
    
    0 讨论(0)
  • 2020-12-05 10:03

    EditText, like any other view/component can be customized in the xml file. You just need to include below attribute in the EditText attributes.

     android:background="@null"
    
    0 讨论(0)
提交回复
热议问题