LabelsView icon indicating copy to clipboard operation
LabelsView copied to clipboard

如何给标签设置不同的背景色

Open sangsais opened this issue 4 years ago • 1 comments

比如有六个标签,每个标签都配置了不同的背景色

sangsais avatar Dec 30 '19 07:12 sangsais

labelsView.setLabels(testList, new LabelsView.LabelTextProvider() { @override public CharSequence getLabelText(TextView label, int position, TestBean data) { // 在这里可以给你的标签项单独设置属性。比如标签背景,文字颜色等: label.setBackgroundResource(resId); return data.getName(); } });

donkingliang avatar Dec 30 '19 13:12 donkingliang