Skip to content
New issue

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

@Event(value=???,type=???) #17

Closed
28610966 opened this issue Nov 18, 2015 · 1 comment
Closed

@Event(value=???,type=???) #17

28610966 opened this issue Nov 18, 2015 · 1 comment

Comments

@28610966
Copy link

换成新的版本后, 事件注入直接没用了,什么情况啊?

@wyouflf
Copy link
Owner

wyouflf commented Nov 18, 2015

/**

    1. 方法必须私有限定,
    1. 方法以Click或Event结尾, 方便配置混淆编译参数 :
  • -keepattributes Annotation
  • -keepclassmembers class * {
  • void *(android.view.View);
  • *** *Click(...);
  • *** *Event(...);
  • }
    1. 方法参数形式必须和type对应的Listener接口一致.
    1. 注解参数value支持数组: value={id1, id2, id3}
    1. 其它参数说明见{@link org.xutils.event.annotation.Event}类的说明.
      _/
      @event(value = R.id.btn_test_baidu1,
      type = View.OnClickListener.class/_可选参数, 默认是View.OnClickListener.class
      /)
      private void onTestBaidu1Click(View view) {
      ...
      }

@wyouflf wyouflf closed this as completed Nov 26, 2015
@kumaleap kumaleap mentioned this issue May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants