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

6.8.7OnClicks怎么写啊 #17

Open
yanxudong1 opened this issue Jun 14, 2024 · 1 comment
Open

6.8.7OnClicks怎么写啊 #17

yanxudong1 opened this issue Jun 14, 2024 · 1 comment

Comments

@yanxudong1
Copy link

@OnClicks({R.id.btn_fab2,R.id.btn_fab})
public void startTest(View v) {
    switch (v.getId()){
        case R.id.btn_fab2:
            Log.e("test", "button1: " +v.getId());
            break;
        case R.id.btn_fab:
            Log.e("test", "button2: " +v.getId());
            break;
    }


}

这样写没有效果

@LoveDoLove
Copy link

需要
@BindView(R.id.fab2)
private Button button;
要做這一步才可以哦

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