光环助手V3.7.5-视频详情UI优化2(2) https://gitlab.ghzs.com/pm/halo-app-issues/issues/801
This commit is contained in:
@ -31,6 +31,7 @@ import com.facebook.imagepipeline.image.CloseableImage;
|
||||
import com.gh.common.constant.Config;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.WeiBoShareActivity;
|
||||
import com.gh.gamecenter.eventbus.EBShare;
|
||||
import com.lightgame.utils.Utils;
|
||||
import com.sina.weibo.sdk.WbSdk;
|
||||
import com.sina.weibo.sdk.auth.AuthInfo;
|
||||
@ -53,6 +54,8 @@ import java.util.List;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import static com.gh.common.util.LoginHelper.WEIBO_SCOPE;
|
||||
|
||||
/**
|
||||
@ -97,6 +100,7 @@ public class ShareUtils {
|
||||
private PopupWindow popupWindow;
|
||||
|
||||
private ShareType mShareType;
|
||||
public static ShareType shareType;//全局保存shareType,分享成功后判断分享的类型
|
||||
|
||||
private WeakReference<Activity> mActivity;
|
||||
|
||||
@ -106,6 +110,7 @@ public class ShareUtils {
|
||||
@Override
|
||||
public void onComplete(Object o) {
|
||||
Utils.toast(mContext, R.string.share_success_hint);
|
||||
EventBus.getDefault().post(new EBShare(ShareUtils.shareType));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -156,6 +161,7 @@ public class ShareUtils {
|
||||
this.mSummary = shareSummary;
|
||||
this.mTitle = shareTitle;
|
||||
this.mShareType = shareType;
|
||||
ShareUtils.shareType = mShareType;
|
||||
|
||||
View contentView = View.inflate(activity, R.layout.share_popup_layout, null);
|
||||
contentView.setFocusable(true);
|
||||
@ -181,7 +187,7 @@ public class ShareUtils {
|
||||
callBack.onCancel();
|
||||
} else {
|
||||
if (!"复制链接".equals(arrLabel[position])) {
|
||||
callBack.onSuccess();
|
||||
callBack.onSuccess(arrLabel[position]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -647,7 +653,7 @@ public class ShareUtils {
|
||||
}
|
||||
|
||||
public interface ShareCallBack {
|
||||
void onSuccess();
|
||||
void onSuccess(String label);
|
||||
|
||||
void onCancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user