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

最上面的group条目无法执行group上的Imageview事件 #5

Open
helenaccount opened this issue Jan 11, 2016 · 1 comment
Open

Comments

@helenaccount
Copy link

getGroupView方法中
groupHolder.follow_icon_help.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                Log.e("error", groupPosition + "$$$$$$$$$$$$");

            }
        });

在固定的group条目中不执行

@YangShaoXiong
Copy link

@OverRide
public void updatePinnedHeader(View headerView, int firstVisibleGroupPos) {
String title = (String) mAdapter.getGroup(firstVisibleGroupPos);
TextView tv = (TextView) headerView.findViewById(R.id.group_name);
tv.setText(title);
ImageView iv = (ImageView) headerView.findViewById(R.id.group_iv);
iv.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
Log.d(TAG, "onClick: imageview");
}
});
}
这个你得在adapter和activity都实现即可。因为group pinned顶部时不是adapter中的view。

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