为什么不能设置代号为One的SpanLabel的字体?
SpanLabel title = new SpanLabel("SpanLabel");
title.getAllStyles().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
不起作用
最佳答案
SpanLabel title = new SpanLabel("SpanLabel");
**title.getTextAllStyles()**.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
要更改spanlabel的样式,应调用getTextAllStyle方法,如上面的代码所示