【问题标题】:EditText without line at bottomEditText 底部没有线条
【发布时间】:2015-02-23 17:58:02
【问题描述】:

我想让我的编辑文本字段底部没有线条,就像这张图片一样 现在我的编辑文本看起来像这样 我该怎么做?

【问题讨论】:

标签: android android-layout android-edittext


【解决方案1】:
<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@null"/>

你可以通过将背景设置为null来实现

【讨论】:

    【解决方案2】:

    您可以将 EditText 设置为具有自定义透明可绘制对象或仅使用

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

    它正在工作。

    【讨论】:

      【解决方案3】:

      您可以通过使用

      获得EditText 中的transparent background
       android:background="#00000000" 
      

       android:background="@null"
      

      您可以创建custom drawable.xml,然后创建drawable transparent 并使用

      android:background="@drawable/customdrawable"
      

      【讨论】:

        【解决方案4】:

        试试下面的代码:-

        android:background="@null"
        

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

        上面的代码让你的edittext背景透明。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2021-03-03
          • 1970-01-01
          • 2014-01-03
          • 2015-06-17
          • 1970-01-01
          • 2015-09-08
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多