如何在EditText下划线 [英] How to underline an EditText

查看:169
本文介绍了如何在EditText下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AndroidStudio中为EditText下划线时遇到一些问题.

I am having some problems to underline an EditText in AndroidStudio.

这就是我要寻找的(这只是一张照片,而不是我的真实文字):

This is what I am looking for (this is just a photo, not my real text):

但是我真的不知道有什么财产可以做到这一点.

But I do not really know any property to do that.

我现在的代码非常简单.只是正常"的一个:

My code right now is really simple. Just the "normal" one:

 <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:ems="10"
        android:layout_margin="16dp"
        android:id="@+id/tx_titulo"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:text="@string/pt_titulo"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:allowUndo="true"
        />

我不想仅在文本下划线(在本例中为Título")下划线,而是在整个PlainText下划线

I do not want to underline just the text (in this case "Título"), but the whole PlainText

有人知道吗? 问候.

推荐答案

它是默认设置,但请尝试检查您的样式.也许有一种样式可以覆盖整个应用程序中的样式.如果有,只需将其删除

It is default, but try to check your styles. Maybe there is a style that will override the style in the whole application. If there is, just remove it

这篇关于如何在EditText下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆