修改分享界面
This commit is contained in:
@ -33,9 +33,12 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.sharesdk.framework.Platform;
|
||||
import cn.sharesdk.framework.PlatformActionListener;
|
||||
import cn.sharesdk.framework.ShareSDK;
|
||||
import de.greenrobot.event.EventBus;
|
||||
import onekeyshare.OnekeyShare;
|
||||
import onekeyshare.themes.classic.PlatformPage;
|
||||
|
||||
public class BaseActivity extends Activity {
|
||||
private String LOG = this.getClass().getName();
|
||||
@ -149,8 +152,12 @@ public class BaseActivity extends Activity {
|
||||
}
|
||||
|
||||
public void showShare(String url, String title, String icon, String entrance, String type) {
|
||||
|
||||
if (isShowShare){
|
||||
return;
|
||||
}
|
||||
|
||||
ShareSDK.initSDK(this);
|
||||
|
||||
OnekeyShare oks = new OnekeyShare();
|
||||
// 关闭sso授权
|
||||
oks.disableSSOWhenAuthorize();
|
||||
@ -189,13 +196,23 @@ public class BaseActivity extends Activity {
|
||||
// DataCollectionManager.onEvent(BaseActivity.this, "share", map);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
oks.setOnFinishListener(new PlatformPage.OnFinishListener() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
Utils.log("onFinish");
|
||||
isShowShare = false;
|
||||
}
|
||||
});
|
||||
|
||||
// 启动分享GUI
|
||||
oks.show(this);
|
||||
|
||||
TCAgent.onEvent(this, "内容分享", title);
|
||||
isShowShare = true;
|
||||
}
|
||||
|
||||
private boolean isShowShare = false;
|
||||
|
||||
public void onEventMainThread(EBShowDialog showDialog) {
|
||||
if (!isPause && this.getClass().getName().equals(RunningUtils.getTopActivity(this))) {
|
||||
if ("hijack".equals(showDialog.getType())) {
|
||||
|
||||
Reference in New Issue
Block a user