【问题标题】: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背景透明。