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

点击事件和 展开怎么区分啊 OnTreeNodeClickListener这个同事响应展开 和子条目点击事件 #4

Open
moyihen opened this issue May 15, 2017 · 1 comment

Comments

@moyihen
Copy link

moyihen commented May 15, 2017

No description provided.

@ostea
Copy link

ostea commented Sep 21, 2018

No description provided.

TreeListViewAdapter.java 可以看看源码

···
/**
* 设置节点点击时,可以展开以及关闭;并且将ItemClick事件继续往外公布
*/
mTree.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@OverRide
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
expandOrCollapse(position);

            if (onTreeNodeClickListener != null) {
                onTreeNodeClickListener.onClick(mNodes.get(position),
                        position);
            }
        }

    });

···

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