-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everytime I see PR like this, I pour one out for Netbeans Jackpot.
text = currentText.toSpannable().apply { | ||
setSpan(UnderlineSpan(), 0, currentText.length, 0) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer an extension property here, or at least make the method take an optional start, end
or start, len
arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What sort of property are you thinking of? I'd prefer not to add the arguments as all the uses of UnderlineSpan just underline the entire string.
Codecov Report
@@ Coverage Diff @@
## master #12520 +/- ##
============================================
+ Coverage 24.73% 24.94% +0.20%
- Complexity 828 830 +2
============================================
Files 388 389 +1
Lines 15668 15625 -43
Branches 2024 2019 -5
============================================
+ Hits 3875 3897 +22
+ Misses 11480 11417 -63
+ Partials 313 311 -2
Continue to review full report at Codecov.
|
Adding an underline to a TextView seems to be a fairly common pattern, so lets put it in a helper method. Also adds more tests to some of the changed components.