简体   繁体   中英

How to remove the underscore from Android Text input?

I am currently developing a multi-platformed app for use on IOS/Android/Windows phone.

I am trying to create a 'themed' text input, where all buttons/inputs/text look identical throughout all aspects of the devices by using DevExtreme (typescript).

I have almost completed it, although below shows my problem with android:

Android的样本输入

This shows a blue 'underscore' on text input. For my system, this is NOT wanted.

Is there a way of editing my css file as to force remove this from the android platform?

I have previously tried removing the text decoration:

text-decoration: none;

But this did not work.

Anyone got any ideas/solutions to remove this?

Some of my css file so far:

[type=text]{
     padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
  border: 2px solid rgba(0, 0, 0, 0); 
  border-color:none;
  -webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
background-color: #585757;
color:#cfcfcf;
}
[type=text]:focus{ 

    box-shadow: 0 0 5px rgba(81, 203, 238, 1);
  padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
  border: 2px solid rgba(81, 203, 238, 1); 
  -webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
background-color: #585757;
color:#cfcfcf;
}

[type=text]:active{
    margin: 5px 1px 3px 0px;
    border: 2px solid transparent;   

    border-color: blue;
    -webkit-box-shadow: 0 0 8px blue;
       -moz-box-shadow: 0 0 8px blue;
            box-shadow: 0 0 8px blue;

            -webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
background-color: #585757;
color:#cfcfcf;

}

Is there an element to remove this from an android device?

您可以通过将EditText的Background Drawable设置为null来实现

editText.setBackgroundDrawable(null)

Try this css styles to say to the all links without underline

A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM