We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在A界面中的setEvents()方法中直接写上如下代码,没错就是直接跳转 jump(ModuleTestActivity.class, new OnJumpResponseListener() { @OverRide public void OnResponse(JumpParameter jumpParameter) { if (jumpParameter == null) { toast("未返回任何数据"); } else { toast("收到返回数据,参数“返回数据1”中的值为:" + jumpParameter.get("返回数据1")); mTestText.setText((CharSequence) jumpParameter.get("返回数据1")); } } });
然后B界面代码 setEvent()方法 if ((boolean) getParameter().get("needResponse") == true) { setResponse(new JumpParameter().put("返回数据1", "测试成功")); } else { toast("needResponse = false:不需要返回数据给上一个界面"); } new Thread(new Runnable() { @OverRide public void run() { try { Thread.sleep(3000); finish(); } catch (InterruptedException e) { e.printStackTrace(); } } }).start();
返回到A界面弹框数据为NULL
The text was updated successfully, but these errors were encountered:
这是因为回传数据是在onResume后执行的,而当你一启动Activity就执行跳转回调会造成逻辑错误,请确保第一个Activity完成加载后进行跳转。
Sorry, something went wrong.
后续版本我会对消息线进行改进,以将这种问题完全解决。
如果你正在使用 AndroidX 版本,请更新至 6.7.7.6 测试版本,已修复此问题
Support版本也已经同步更新至测试版本 6.7.7.6
No branches or pull requests
我在A界面中的setEvents()方法中直接写上如下代码,没错就是直接跳转
jump(ModuleTestActivity.class, new OnJumpResponseListener() {
@OverRide
public void OnResponse(JumpParameter jumpParameter) {
if (jumpParameter == null) {
toast("未返回任何数据");
} else {
toast("收到返回数据,参数“返回数据1”中的值为:" + jumpParameter.get("返回数据1"));
mTestText.setText((CharSequence) jumpParameter.get("返回数据1"));
}
}
});
然后B界面代码 setEvent()方法
if ((boolean) getParameter().get("needResponse") == true) {
setResponse(new JumpParameter().put("返回数据1", "测试成功"));
} else {
toast("needResponse = false:不需要返回数据给上一个界面");
}
new Thread(new Runnable() {
@OverRide
public void run() {
try {
Thread.sleep(3000);
finish();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();
返回到A界面弹框数据为NULL
The text was updated successfully, but these errors were encountered: