|
@@ -2615,8 +2615,7 @@ public class CommonUtil {
|
|
|
LogUtil.println("checkCopyText", "\ntext\t", text);
|
|
LogUtil.println("checkCopyText", "\ntext\t", text);
|
|
|
if (!TextUtils.isEmpty(text)) {//内容不为空时尝试检查
|
|
if (!TextUtils.isEmpty(text)) {//内容不为空时尝试检查
|
|
|
String textString = text.toString();
|
|
String textString = text.toString();
|
|
|
- StringUtils.CopyText("\t");//清除粘贴板内容,直接填空不行,不知道为什么
|
|
|
|
|
- View.OnClickListener closeListener = view -> {};
|
|
|
|
|
|
|
+ View.OnClickListener closeListener = view -> StringUtils.CopyText("\t");//清除粘贴板内容,直接填空不行,不知道为什么
|
|
|
DialogConfig dialogConfig = new DialogConfig().setTitle("小绵羊提示").setBtnCloseOnClickListener(closeListener);
|
|
DialogConfig dialogConfig = new DialogConfig().setTitle("小绵羊提示").setBtnCloseOnClickListener(closeListener);
|
|
|
String url;
|
|
String url;
|
|
|
if ((url = StringUtils.findUrl(text)) != null) {//如果是链接,直接跳转外部浏览器
|
|
if ((url = StringUtils.findUrl(text)) != null) {//如果是链接,直接跳转外部浏览器
|
|
@@ -2655,9 +2654,7 @@ public class CommonUtil {
|
|
|
if (TestUtil.isTest()) {//下面的功能暂不提供给用户
|
|
if (TestUtil.isTest()) {//下面的功能暂不提供给用户
|
|
|
dialogConfig.setMsg("已经复制如下内容:\n" + textString + "\n,是否访问该链接?")
|
|
dialogConfig.setMsg("已经复制如下内容:\n" + textString + "\n,是否访问该链接?")
|
|
|
.setBtnLeftText("外部h5").setBtnLeftOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url))
|
|
.setBtnLeftText("外部h5").setBtnLeftOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url))
|
|
|
- .setBtnRightText("内部h5").setBtnRightOnClickListener(view -> {
|
|
|
|
|
- Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url, "测试内部h5");
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ .setBtnRightText("内部h5").setBtnRightOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url, "测试内部h5"));
|
|
|
ViewUtil.showMsgDialog(SheepApp.getInstance().getCurrentActivity(), dialogConfig);
|
|
ViewUtil.showMsgDialog(SheepApp.getInstance().getCurrentActivity(), dialogConfig);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2665,6 +2662,7 @@ public class CommonUtil {
|
|
|
//检查是否是小绵羊分享页面,如果是且获取到了game_id,返回true并调用接口获取对应的applications,然后尝试显示游戏对话框,提示用户是否查看游戏详情
|
|
//检查是否是小绵羊分享页面,如果是且获取到了game_id,返回true并调用接口获取对应的applications,然后尝试显示游戏对话框,提示用户是否查看游戏详情
|
|
|
private boolean checkShouYouShare(View.OnClickListener closeListener, String url) {
|
|
private boolean checkShouYouShare(View.OnClickListener closeListener, String url) {
|
|
|
if (url.contains("/shou_you_share/index.html")) {
|
|
if (url.contains("/shou_you_share/index.html")) {
|
|
|
|
|
+ closeListener.onClick(null);
|
|
|
String gameId = StringUtils.getQueryParameter(url, "game_id");
|
|
String gameId = StringUtils.getQueryParameter(url, "game_id");
|
|
|
if (!TextUtils.isEmpty(gameId)) {
|
|
if (!TextUtils.isEmpty(gameId)) {
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().getAppId(gameId)//http://10.8.220.229:8800/shou_you_share/index.html?invitation_code=12799442&game_id=1553
|
|
SheepApp.getInstance().getNetComponent().getApiService().getAppId(gameId)//http://10.8.220.229:8800/shou_you_share/index.html?invitation_code=12799442&game_id=1553
|