コード例 #1
0
ファイル: HtmlLabelRenderer.cs プロジェクト: dorisoy/Wesley
        private void MakeLinkClickable(ISpannable strBuilder, URLSpan span)
        {
            var start     = strBuilder.GetSpanStart(span);
            var end       = strBuilder.GetSpanEnd(span);
            var flags     = strBuilder.GetSpanFlags(span);
            var clickable = new MyClickableSpan((HtmlLabel)Element, span);

            strBuilder.SetSpan(clickable, start, end, flags);
            strBuilder.RemoveSpan(span);
        }
コード例 #2
0
        private static void MakeLinkClickable(ISpannable spannable, URLSpan span)
        {
            var start         = spannable.GetSpanStart(span);
            var end           = spannable.GetSpanEnd(span);
            var flags         = spannable.GetSpanFlags(span);
            var clickableLink = new ClickableLinkSpan(span.URL);

            spannable.SetSpan(clickableLink, start, end, flags);
            spannable.RemoveSpan(span);
        }