Back to project page codemap.
The source code is released under:
GNU General Public License
If you think the Android project codemap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.hdweiss.codemap.view.workspace.fragments; // w w w.ja v a 2 s .c om import android.text.style.ClickableSpan; import android.text.style.URLSpan; import android.view.View; import com.hdweiss.codemap.util.SpanUtils.SpanConverter; public class FunctionLinkSpan extends ClickableSpan { private CodeMapFunction codeMapFunction; private String url; public FunctionLinkSpan(CodeMapFunction codeMapFunction, String url) { this.codeMapFunction = codeMapFunction; this.url = url; } @Override public void onClick(View widget) { codeMapFunction.addChildFragment(url); } public static class FunctionLinkSpanConverter implements SpanConverter<URLSpan, FunctionLinkSpan> { private CodeMapFunction codeMapFunction; public FunctionLinkSpanConverter(CodeMapFunction codeMapFunction) { this.codeMapFunction = codeMapFunction; } public FunctionLinkSpan convert(URLSpan span) { FunctionLinkSpan linkSpan = new FunctionLinkSpan(codeMapFunction, span.getURL()); return linkSpan; } } }