Skip to content

Commit

Permalink
add method: 'SelectableHelper#toggle(int)'
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfeng committed Nov 27, 2020
1 parent 4d4a450 commit 9fe416e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ public void setSelect(int position, boolean select) throws IllegalArgumentExcept
}
}

/**
* 切换 position 处的选择状态。
*/
public void toggle(int position) {
setSelect(position, !isSelected(position));
}

/**
* 查询某个列表项是否已被选中。
*
Expand Down

0 comments on commit 9fe416e

Please sign in to comment.