Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
teach committed Apr 7, 2021
1 parent 1e4b1c2 commit f1afeb2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion labels/src/main/java/com/donkingliang/labels/LabelsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,10 @@ public void clearCompulsorys() {
* @return
*/
public List<Integer> getSelectLabels() {
return mSelectLabels;
// 返回新的List对象,避免外部获取mSelectLabels后直接操作数据
List<Integer> list = new ArrayList<>();
list.addAll(mSelectLabels);
return list;
}

/**
Expand Down Expand Up @@ -1231,4 +1234,15 @@ public interface LabelTextProvider<T> {
CharSequence getLabelText(TextView label, int position, T data);
}

/**
*
*/
public interface Selectable {

void onSelected(boolean selected);

boolean isSelected();

}

}

0 comments on commit f1afeb2

Please sign in to comment.