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

布局里子控件点击的不起作用啊 #95

Open
chhandsome opened this issue Feb 25, 2019 · 2 comments
Open

布局里子控件点击的不起作用啊 #95

chhandsome opened this issue Feb 25, 2019 · 2 comments

Comments

@chhandsome
Copy link

设置了监听写在ViewHolder里
@OverRide
public View createView(Context context) {
View view = LayoutInflater.from(context).inflate(R.layout.item_agent_apply, null);
imageView = view.findViewById(R.id.agent_iv);
tv_type = view.findViewById(R.id.tv_type);
tv_num = view.findViewById(R.id.tv_num);
textView52 = view.findViewById(R.id.textView52);
textView53 = view.findViewById(R.id.textView53);
textView55 = view.findViewById(R.id.textView55);
bt_apply = view.findViewById(R.id.bt_apply);
bt_apply.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
if(null != onClildClickListener) {
onClildClickListener.click(v, 1);
}
}
});//调用后并不起作用

    return view;
}
@JovanLep
Copy link

JovanLep commented Mar 7, 2019

写在 setPage前面就OK了

@JovanLep
Copy link

JovanLep commented Mar 7, 2019

我看前面的历史issues得出的结论

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