openSharePage分享弹窗切换到UI线程打开
This commit is contained in:
@@ -75,6 +75,7 @@ public class JSInterface {
|
||||
private int mPosition;
|
||||
private MediaRecorder recorder;
|
||||
private File myRecAudioFile;
|
||||
private ExtAudioRecorder extAudioRecorder;
|
||||
|
||||
public JSInterface(WebView webView, CommonWebViewActivity activity) {
|
||||
mWebView = webView;
|
||||
@@ -87,10 +88,6 @@ public class JSInterface {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setPosition(int position) {
|
||||
mPosition = position;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调转个人主页
|
||||
*
|
||||
@@ -122,10 +119,12 @@ public class JSInterface {
|
||||
@JavascriptInterface
|
||||
public void openSharePage() {
|
||||
if (mActivity != null) {
|
||||
ShareDialog shareDialog = new ShareDialog(mActivity);
|
||||
shareDialog.setOnShareDialogItemClick(mActivity);
|
||||
shareDialog.setType(ShareDialog.TYPE_SHARE_H5);
|
||||
shareDialog.show();
|
||||
mActivity.runOnUiThread(() -> {
|
||||
ShareDialog shareDialog = new ShareDialog(mActivity);
|
||||
shareDialog.setOnShareDialogItemClick(mActivity);
|
||||
shareDialog.setType(ShareDialog.TYPE_SHARE_H5);
|
||||
shareDialog.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,10 +134,12 @@ public class JSInterface {
|
||||
WebJsBeanInfo webJsBeanInfo = JSON.parseObject(json, WebJsBeanInfo.class);
|
||||
RxBus.get().post(new ShareH5Event().setWebJsBeanInfo(webJsBeanInfo));
|
||||
if (mActivity != null) {
|
||||
ShareDialog shareDialog = new ShareDialog(mActivity);
|
||||
shareDialog.setOnShareDialogItemClick(mActivity);
|
||||
shareDialog.setType(ShareDialog.TYPE_SHARE_H5);
|
||||
shareDialog.show();
|
||||
mActivity.runOnUiThread(() -> {
|
||||
ShareDialog shareDialog = new ShareDialog(mActivity);
|
||||
shareDialog.setOnShareDialogItemClick(mActivity);
|
||||
shareDialog.setType(ShareDialog.TYPE_SHARE_H5);
|
||||
shareDialog.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,6 +235,10 @@ public class JSInterface {
|
||||
return String.valueOf(mPosition);
|
||||
}
|
||||
|
||||
public void setPosition(int position) {
|
||||
mPosition = position;
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void challenge(long uid, String gameId) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.gamelist_challenge, "挑战按钮");
|
||||
@@ -286,8 +291,6 @@ public class JSInterface {
|
||||
NimP2PMessageActivity.start(context, uid);
|
||||
}
|
||||
|
||||
private ExtAudioRecorder extAudioRecorder;
|
||||
|
||||
@JavascriptInterface
|
||||
public boolean startRecode() {
|
||||
// recorder 实例
|
||||
|
Reference in New Issue
Block a user