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
如demo中所示:同一个AuthorEvent对象,但是post发送参数也都是AuthorEvent,如果我有两个接受不同的事件(携带的都是AuthorEvent,但是要做的是不一样的,怎么区分); 因此,我想起,post可以携带参数发送,即post("tag",AuthorEvent);但是我发现你这个框架中,接收事件注解类 @retention(RetentionPolicy.RUNTIME) @target(ElementType.METHOD) public @interface Subscribe { ThreadMode threadMode() default ThreadMode.MAIN_THREAD; } 有问题, @subscribe 后面没法添加(“tag”),编译报错,请问如何修改 @interface Subscribe 这个接受事件注解类呢?
The text was updated successfully, but these errors were encountered:
@SimpleGentleman 如果需要携带参数,可以在事件AuthorEvent中定义一个变量来携带,发送事件时传入不同的值就行。
Sorry, something went wrong.
这也到是一种思路,也行,谢谢哈。
No branches or pull requests
如demo中所示:同一个AuthorEvent对象,但是post发送参数也都是AuthorEvent,如果我有两个接受不同的事件(携带的都是AuthorEvent,但是要做的是不一样的,怎么区分);
因此,我想起,post可以携带参数发送,即post("tag",AuthorEvent);但是我发现你这个框架中,接收事件注解类
@retention(RetentionPolicy.RUNTIME)
@target(ElementType.METHOD)
public @interface Subscribe {
ThreadMode threadMode() default ThreadMode.MAIN_THREAD;
}
有问题,
@subscribe 后面没法添加(“tag”),编译报错,请问如何修改 @interface Subscribe 这个接受事件注解类呢?
The text was updated successfully, but these errors were encountered: