We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
分组拖动,移除后添加 int position = holder.getAdapterPosition(); int parentPosition = getParentPosition(getItem(position)); Level1Item subItem = new Level1Item("新添加" + position, ""); ((Level0Item) getData().get(parentPosition)).addSubItem(position, subItem); ((Level0Item) getData().get(parentPosition)).getSubItems(); addData(position + 1, subItem); position 应该怎么算插入的位置。 在AbstractExpandableItem 里面 public void addSubItem(int position, T subItem) { if (mSubItems != null && position >= 0 && position < mSubItems.size()) { mSubItems.add(position, subItem); } else { addSubItem(subItem); } }
The text was updated successfully, but these errors were encountered:
收到
Sorry, something went wrong.
由于这个问题提出的比较久了,而且描述的不是很清楚,因此先行关闭。 如果您已经解决该问题,可以在下方回复解决方案。 如果您还有遇到此问题,请参考 #2807 重新提交 Issue 。
No branches or pull requests
分组拖动,移除后添加
int position = holder.getAdapterPosition();
int parentPosition = getParentPosition(getItem(position));
Level1Item subItem = new Level1Item("新添加" + position, "");
((Level0Item) getData().get(parentPosition)).addSubItem(position, subItem);
((Level0Item) getData().get(parentPosition)).getSubItems();
addData(position + 1, subItem);
position 应该怎么算插入的位置。
在AbstractExpandableItem 里面
public void addSubItem(int position, T subItem) {
if (mSubItems != null && position >= 0 && position < mSubItems.size()) {
mSubItems.add(position, subItem);
} else {
addSubItem(subItem);
}
}
The text was updated successfully, but these errors were encountered: