]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/util/NonLinkClickableSpan.java
Simplify NonLinkClickableSpan.
[Dictionary.git] / src / com / hughes / android / util / NonLinkClickableSpan.java
index 014413aca6a7d02ab9784ed2ddf3b2b9103e7c20..645d0c9b155ccfb864b473910954edd9a8316755 100644 (file)
@@ -19,19 +19,22 @@ import android.text.style.ClickableSpan;
 import android.view.View;
 
 public class NonLinkClickableSpan extends ClickableSpan {
-  
-  static NonLinkClickableSpan instance = new NonLinkClickableSpan();
-
-  // Won't see these on a long-click.
-  @Override
-  public void onClick(View widget) {
-  }
-
-  @Override
-  public void updateDrawState(TextPaint ds) {
-    super.updateDrawState(ds);
-    ds.setUnderlineText(false);
-    //ds.setColor(color);
-  }
+
+    // The singleton pattern doesn't work here--we need a separate instance for
+    // each span.
+
+    public NonLinkClickableSpan() {
+    }
+
+    // Won't see these on a long-click.
+    @Override
+    public void onClick(View widget) {
+        // Don't need to do anything. These spans are just used to see where
+        // the user long-pressed.
+    }
+
+    @Override
+    public void updateDrawState(TextPaint ds) {
+    }
 
 }