]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Simplify NonLinkClickableSpan.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 10 Dec 2017 21:20:24 +0000 (22:20 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 10 Dec 2017 21:20:53 +0000 (22:20 +0100)
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/util/NonLinkClickableSpan.java

index 863e20b81bffcaaefa20935baef6ac467af99715..34e37d6322a62181632b1bb372b3d4f9831b3a04 100644 (file)
@@ -1772,7 +1772,7 @@ public class DictionaryActivity extends ActionBarActivity {
         textView.setMovementMethod(LinkMovementMethod.getInstance());
         final Matcher matcher = CHAR_DASH.matcher(text);
         while (matcher.find()) {
-            spannable.setSpan(new NonLinkClickableSpan(textColorFg), matcher.start(),
+            spannable.setSpan(new NonLinkClickableSpan(), matcher.start(),
                               matcher.end(),
                               Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
         }
index 46857d7666b77022b8a53e8dd9bcc91f2abe5ae9..645d0c9b155ccfb864b473910954edd9a8316755 100644 (file)
@@ -23,10 +23,7 @@ public class NonLinkClickableSpan extends ClickableSpan {
     // The singleton pattern doesn't work here--we need a separate instance for
     // each span.
 
-    final int color;
-
-    public NonLinkClickableSpan(int color) {
-        this.color = color;
+    public NonLinkClickableSpan() {
     }
 
     // Won't see these on a long-click.
@@ -38,9 +35,6 @@ public class NonLinkClickableSpan extends ClickableSpan {
 
     @Override
     public void updateDrawState(TextPaint ds) {
-        super.updateDrawState(ds);
-        ds.setUnderlineText(false);
-        ds.setColor(color);
     }
 
 }