Search in sources :

Example 6 with UMWeb

use of com.umeng.socialize.media.UMWeb 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;
    }
}
Also used : Intent(android.content.Intent) ShareAction(com.umeng.socialize.ShareAction) UMImage(com.umeng.socialize.media.UMImage) UMWeb(com.umeng.socialize.media.UMWeb)

Aggregations

UMImage (com.umeng.socialize.media.UMImage)6 UMWeb (com.umeng.socialize.media.UMWeb)6 ShareAction (com.umeng.socialize.ShareAction)4 Intent (android.content.Intent)2 ShareDialog (cn.cqautotest.sunnybeach.ui.dialog.ShareDialog)2 Platform (com.hjq.umeng.Platform)2 UMShareListener (com.umeng.socialize.UMShareListener)2 SHARE_MEDIA (com.umeng.socialize.bean.SHARE_MEDIA)2 Gravity (android.view.Gravity)1 View (android.view.View)1 Button (android.widget.Button)1 Nullable (androidx.annotation.Nullable)1 R (cn.cqautotest.sunnybeach.R)1 SingleClick (cn.cqautotest.sunnybeach.aop.SingleClick)1 AppActivity (cn.cqautotest.sunnybeach.app.AppActivity)1 DialogManager (cn.cqautotest.sunnybeach.manager.DialogManager)1 AddressDialog (cn.cqautotest.sunnybeach.ui.dialog.AddressDialog)1 DateDialog (cn.cqautotest.sunnybeach.ui.dialog.DateDialog)1 InputDialog (cn.cqautotest.sunnybeach.ui.dialog.InputDialog)1 MenuDialog (cn.cqautotest.sunnybeach.ui.dialog.MenuDialog)1