protected void AutoLinkAction(AutoLinkType type, string link) { if (string.IsNullOrEmpty(link)) { return; } switch (type) { case AutoLinkType.Hashtag: Activity.Intent.PutExtra(SearchFragment.SearchExtra, link); ((BaseActivity)Activity).OpenNewContentFragment(new PreSearchFragment()); break; case AutoLinkType.Mention: ((BaseActivity)Activity).OpenNewContentFragment(new ProfileFragment(link)); break; case AutoLinkType.Url: var intent = new Intent(Intent.ActionView); intent.SetData(Android.Net.Uri.Parse(link)); StartActivity(intent); break; } }
private void LinkClick(AutoLinkType type, string url) { var intent = new Intent(Intent.ActionView); intent.SetData(Android.Net.Uri.Parse(url)); _context.StartActivity(intent); }
private void AppendLinkItems(HashSet <LinkItem> set, AutoLinkType type, Matcher matcher) { while (matcher.Find()) { set.Add(new LinkItem { Matched = matcher.Group(), Start = matcher.Start(), End = matcher.End(), Mode = type }); } }
private void LinkClick(AutoLinkType type, string link) { Cancel(); _autoLinkAction?.Invoke(type, link); }