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

How to Add a Dotted Underline Beneath HTML Text

It’s impossible without CSS. In fact, the <u> tag is simply adding text-decoration:underline to the text with the browser’s built-in CSS. Here’s what you can do: <html> <head> <!– Other head stuff here, like title or meta –> <style type=”text/css”> u { border-bottom: 1px dotted #000; text-decoration: none; } </style> </head> <!– Body, content here … Read more