我不知道如何将部分文本设置为Blackberry中的LabelField粗体。
请参阅附图,
答案 0 :(得分:1)
This示例应该包含您需要的所有内容。您的代码应如下所示:
String copyText = "Tap NEXT to proceed";
Font[] fonts = new Font[2];
fonts[0] = Font.getDefault();
fonts[1] = Font.getDefault().derive(Font.BOLD);
int[] offsets = new int[4];
offsets[0] = 0;
offsets[1] = "Tap ".length
offsets[2] = "Tap NEXT".length;
offsets[3] = copyText.length();
byte[] attributes = new byte[3];
attributes[0] = 0;
attributes[1] = 1;
attributes[2] = 0;
RichTextField textField = new RichTextField(copyText, offsets, attributes, fonts, NON_FOCUSABLE);
add(textField);