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

(已解决)提问 绑定控件的点击事件无效 #12

Closed
AmioLee opened this issue Jan 16, 2019 · 1 comment
Closed

(已解决)提问 绑定控件的点击事件无效 #12

AmioLee opened this issue Jan 16, 2019 · 1 comment

Comments

@AmioLee
Copy link

AmioLee commented Jan 16, 2019

111111111111111
2222
如图 怎么回事 另外大佬 可以弄个QQ群给大伙交流吗?

@qingmei2
Copy link
Owner

qingmei2 commented Jan 16, 2019

@AmioLee

qq群 391638630

应该是你没有把activity注入到Binding类中,默认BaseActivity类中只注入了BR.id.activity,这样改应该就行了:

<data>
	<variable
		name="activity"
		type="XXXActivity" />
</data>

或者你在Activity里直接指定:

binding.delegate = this

@AmioLee AmioLee changed the title 提问 绑定控件的点击事件无效 (已解决)提问 绑定控件的点击事件无效 Jan 16, 2019
@AmioLee AmioLee closed this as completed Jan 16, 2019
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