Change TextField’s Underline in Flutter

You can also change its color by following ways. Wrap your TextField in Theme and provide accentColor Theme( data: Theme.of(context).copyWith(accentColor: Colors.red), child: TextField(), ) Using inputDecoration property. TextField( decoration: InputDecoration( focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.red), ), ), )

Changing Underline color

There’s now a new css3 property for this: text-decoration-color So you can now have text in one color and a text-decoration underline – in a different color… without needing an extra ‘wrap’ element p { text-decoration: underline; -webkit-text-decoration-color: red; /* safari still uses vendor prefix */ text-decoration-color: red; } <p>black text with red underline in … Read more

IntelliJ IDEA underlines variables when using += in JAVA

It’s a new feature of IntelliJ IDEA 2018.2: Underlining reassigned local variables and reassigned parameters IntelliJ IDEA now underlines reassigned local variables and reassigned parameters, by default. The attributes for all the languages supporting this feature, which for now include Java and Groovy, can be changed in Preferences/Settings | Editor | Color Scheme | Language … Read more

Removing underline with href attribute [duplicate]

Add a style with the attribute text-decoration:none;: There are a number of different ways of doing this. Inline style: <a href=”https://stackoverflow.com/questions/12528316/xxx.html” style=”text-decoration:none;”>goto this link</a> Inline stylesheet: <html> <head> <style type=”text/css”> a { text-decoration:none; } </style> </head> <body> <a href=”https://stackoverflow.com/questions/12528316/xxx.html”>goto this link</a> </body> </html> External stylesheet: <html> <head> <link rel=”Stylesheet” href=”https://stackoverflow.com/questions/12528316/stylesheet.css” /> </head> <body> <a href=”https://stackoverflow.com/questions/12528316/xxx.html”>goto … Read more

Underline text in UIlabel

You may subclass from UILabel and override drawRect method: – (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(ctx, 207.0f/255.0f, 91.0f/255.0f, 44.0f/255.0f, 1.0f); // RGBA CGContextSetLineWidth(ctx, 1.0f); CGContextMoveToPoint(ctx, 0, self.bounds.size.height – 1); CGContextAddLineToPoint(ctx, self.bounds.size.width, self.bounds.size.height – 1); CGContextStrokePath(ctx); [super drawRect:rect]; } UPD: As of iOS 6 Apple added NSAttributedString support for UILabel, so now it’s much easier … Read more

Remove underline from links in TextView – Android

You can do it in code by finding and replacing the URLSpan instances with versions that don’t underline. After you call Linkify.addLinks(), call the function stripUnderlines() pasted below on each of your TextViews: private void stripUnderlines(TextView textView) { Spannable s = new SpannableString(textView.getText()); URLSpan[] spans = s.getSpans(0, s.length(), URLSpan.class); for (URLSpan span: spans) { int … Read more

tech