public void Open(string url, string title, object icon = null) { umWeb = new UMWeb(url); umWeb.Title = title; if (icon == null) { umWeb.SetThumb(new UMImage(context, Resource.Drawable.ic_launcher)); } else { umWeb.SetThumb(new UMImage(context, icon.ToString())); } shareAction.Open(); }
public void Open(string url, string title, string desc, object icon = null) { umWeb = new UMWeb(url); umWeb.Title = title; umWeb.Description = desc; if (string.IsNullOrEmpty(icon.ToString())) { umWeb.SetThumb(new UMImage(context, Resource.Drawable.icon_app)); } else { umWeb.SetThumb(new UMImage(context, icon.ToString())); } shareAction.Open(); }
public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media) { UMWeb web = new UMWeb(Resources.GetString(Resource.String.open_source_url)); web.Title = Resources.GetString(Resource.String.share_title); web.Description = Resources.GetString(Resource.String.share_title); web.SetThumb(new UMImage(this, Resource.Mipmap.ic_launcher)); new ShareAction(this).WithMedia(web) .SetPlatform(media) .SetCallback(new UMengCustomShare(this)) .Share(); }
public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media) { var icon = news.TopicIcon; if (icon.IndexOf("https://") == -1) { icon = "https:" + icon; } UMWeb web = new UMWeb("https://news.cnblogs.com/n/" + news.Id + "/"); web.Title = news.Title; web.Description = news.Summary; web.SetThumb(new UMImage(this, icon)); new ShareAction(this).WithMedia(web) .SetPlatform(media) .SetCallback(new UMengCustomShare(this)) .Share(); }