android - Add custom data with ForegroundColorSpan -


i'm using foregroundcolorspan highlight portion of text in edittext.

jeff feeling hungry @ northbay.

in above example, i've identify northbay based on id in db. later on, have perform querying based on id. apparently there seems no way add custom data foregroundcolorspan instance. possible workaround this?

figured out solution myself. created custom span class as;

public static class myspan extends foregroundcolorspan {      private object instance;      public object getinstance() {         return instance;     }      public void setinstance(object instance) {         this.instance = instance;     }  } 

then used span on style substring in textview.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -