本文整理了Java中com.zx.zxutils.views.ExpandableView.ZXExpandBean.getId()
方法的一些代码示例,展示了ZXExpandBean.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZXExpandBean.getId()
方法的具体详情如下:
包路径:com.zx.zxutils.views.ExpandableView.ZXExpandBean
类名称:ZXExpandBean
方法名:getId
暂无
代码示例来源:origin: StannyBing/ZXUtils
@Override
public void onOpenClick(int position) {
try {
String id = showList.get(position).getId();
if (id != null && id.length() > 0) {
setShowById(dataList, id);
showList.clear();
refresh(dataList);
adapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: StannyBing/ZXUtils
@Override
public void onItemClick(ZXExpandBean expandBean, int showPosition) {
ZXToastUtil.showToast(expandBean.getId());
recyclerHelper.changeOpenStatus(showPosition);
}
})
代码示例来源:origin: StannyBing/ZXUtils
@Override
public void onTextClick(int position) {
try {
String id = showList.get(position).getId();
if (id != null && id.length() > 0) {
if (itemClickListener != null) {
itemClickListener.onItemClick(showList.get(position), position);//数据点击事件
} else {
onOpenClick(position);
}
adapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: StannyBing/ZXUtils
private void setShowById(List<ZXExpandBean> dataList, String id) {
for (int i = 0; i < dataList.size(); i++) {
if (id.equals(dataList.get(i).getId())) {
dataList.get(i).setShowChild(!dataList.get(i).isShowChild());
//如果关闭item,就关闭它的所有子集
if (!dataList.get(i).isShowChild()) {
closeChild(dataList.get(i));
}
return;
}
if (dataList.get(i).getChildList() != null && dataList.get(i).getChildList().size() > 0) {
setShowById(dataList.get(i).getChildList(), id);
}
}
}
代码示例来源:origin: StannyBing/ZXUtils
@Override
public void onSelectClick(int position) {
try {
String id = showList.get(position).getId();
if (id != null && id.length() > 0) {
if (!isMultiSelected) {
setSelect(dataList,false);
} else {
if (showList.get(position).getChildList() != null && showList.get(position).getChildList().size() > 0) {
setSelect(showList.get(position).getChildList(), !showList.get(position).isSelected());
}
}
showList.get(position).setSelected(!showList.get(position).isSelected());
showList.clear();
refresh(dataList);
adapter.notifyDataSetChanged();
}
} catch (Exception e) {
e.printStackTrace();
}
}
};
内容来源于网络,如有侵权,请联系作者删除!