private void MAdapterOnItemClick(object sender, SearchHashtagAdapterAdapterClickEventArgs e) { try { if (e.Position >= 0) { var item = MAdapter.GetItem(e.Position); if (item != null) { // Show All Post By Hash Bundle bundle = new Bundle(); bundle.PutString("HashId", item.Id.ToString()); bundle.PutString("HashName", Methods.FunString.DecodeString(item.Tag)); HashTagPostFragment profileFragment = new HashTagPostFragment { Arguments = bundle }; GlobalContext.OpenFragment(profileFragment); } } } catch (Exception exception) { Console.WriteLine(exception); } }
public void AutoLinkTextViewOnAutoLinkOnClick(object sender, AutoLinkOnClickEventArgs autoLinkOnClickEventArgs) { try { var typetext = Methods.FunString.Check_Regex(autoLinkOnClickEventArgs.P1); if (typetext == "Email") { Methods.App.SendEmail(Activity, autoLinkOnClickEventArgs.P1); return; } else if (typetext == "Website") { String url = autoLinkOnClickEventArgs.P1; if (!autoLinkOnClickEventArgs.P1.Contains("http")) { url = "http://" + autoLinkOnClickEventArgs.P1; } var intent = new Intent(Application.Context, typeof(LocalWebViewActivity)); intent.PutExtra("URL", url); intent.PutExtra("Type", url); Activity.StartActivity(intent); return; } else if (typetext == "Hashtag") { // Show All Post By Hash Bundle bundle = new Bundle(); bundle.PutString("HashId", ""); bundle.PutString("HashName", Methods.FunString.DecodeString(autoLinkOnClickEventArgs.P1)); HashTagPostFragment profileFragment = new HashTagPostFragment { Arguments = bundle }; ((HomeActivity)Activity).OpenFragment(profileFragment); return; } else if (typetext == "Mention") { Bundle bundle = new Bundle(); bundle.PutString("Key", Methods.FunString.DecodeString(autoLinkOnClickEventArgs.P1)); SearchFragment searchFragment = new SearchFragment() { Arguments = bundle }; ((HomeActivity)Activity).OpenFragment(searchFragment); return; } else if (typetext == "Number") { // IMethods.App.SaveContacts(_activity, autoLinkOnClickEventArgs.P1, "", "2"); return; } else { return; } } catch (Exception exception) { Console.WriteLine(exception); } }