mAdapter.setOnTreeNodeClickListener(new TreeListViewAdapter.OnTreeNodeClickListener()
{
@Override
public void onClick(Node node, int position) {
if (node.isLeaf()) { //这里node.isleaf()为false 为什么还执行进去而且else都不执行
LogUtil.LogPrint("login", "第一次if0" + node.isleaf());
sonAttrabuite = node.getAttributespath();
LogUtil.LogPrint("login", "" + node.isleaf());
handler.sendEmptyMessage(HandlerOrder.Three_son);
} else {
LogUtil.LogPrint("login", "第一次else0" + node.isleaf());
if (MainActivity.ifPage == 1) {
MainActivity.attributespath = node.getAttributespath();
MainActivity.attributespath_Warni = (String) SPUtils.get(ctx, "attributesPath", "");
MainActivity.atrributepathName = node.getName();
} else if (MainActivity.ifPage == 2) {
MainActivity.attributespath_Car = node.getAttributespath();
MainActivity.attributespath_Warni = (String) SPUtils.get(ctx, "attributesPath", "");
MainActivity.atrributepathName_Car = node.getName();
} else if (MainActivity.ifPage == 3) {
MainActivity.attributespath_Warni = node.getAttributespath();
MainActivity.atrributepathName_Warni = node.getName();
}
TreeActivity.this.finish();
}
} });
} catch (IllegalAccessException e) {
e.printStackTrace();
}