use of com.umeng.socialize.media.UMImage in project ManPinAPP by AnyMarvel.
the class PersonFragment method onClick.
@Override
public void onClick(View v) {
int id = v.getId();
String linkUrl;
switch(id) {
case R.id.guanyuwomen:
Intent settingIntent = new Intent(getActivity(), SettingAboutActivity.class);
requireActivity().startActivity(settingIntent);
break;
case R.id.manpin_weixin_xiaobian_layout:
Intent intent = new Intent(getActivity(), ManpinWXActivity.class);
startActivity(intent);
break;
case R.id.person_booksource_layout:
Intent intent2 = new Intent(getActivity(), BookSourceActivity.class);
startActivity(intent2);
break;
case R.id.person_fenxiang_layout:
UMWeb weburl = new UMWeb("http://aimanpin.com");
weburl.setDescription("官方网址:\n \n http://aimanpin.com ");
weburl.setTitle("漫品官网");
weburl.setThumb(new UMImage(requireContext(), R.drawable.ic_launcher_share_background));
new ShareAction(requireActivity()).withMedia(weburl).setDisplayList(SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE, SHARE_MEDIA.WEIXIN_FAVORITE, SHARE_MEDIA.QQ, SHARE_MEDIA.QZONE, SHARE_MEDIA.SINA).open();
break;
case R.id.manpin_person_music_layout:
jumpLinkUrl("http://tool.liumingye.cn/music/?page=searchPage");
break;
case R.id.manpin_person_travel:
jumpLinkUrl("http://quanjingke.com/vmindex");
break;
case R.id.manpin_person_wallpaper:
jumpLinkUrl("https://www.logosc.cn/so/");
break;
case R.id.manpin_person_games:
jumpLinkUrl("https://www.yikm.net");
break;
default:
break;
}
}
use of com.umeng.socialize.media.UMImage in project AnkiChinaAndroid by ankichinateam.
the class PosterActivity method shareUrl.
public void shareUrl(View view, SHARE_MEDIA share_media) {
Bitmap bitmap = createBitmapFromView(view);
UMImage imagelocal = new UMImage(this, bitmap);
imagelocal.setThumb(new UMImage(this, bitmap));
new ShareAction(this).withMedia(imagelocal).setPlatform(share_media).setCallback(new UMShareListener() {
@Override
public void onStart(SHARE_MEDIA share_media) {
}
@Override
public void onResult(SHARE_MEDIA share_media) {
}
@Override
public void onError(SHARE_MEDIA share_media, Throwable throwable) {
}
@Override
public void onCancel(SHARE_MEDIA share_media) {
}
}).share();
}
Aggregations