我正在使用 Vector 在黑莓项目的表格中添加元素。字体似乎没有以编程方式更改。我已经在不同屏幕的黑莓手机上测试过它。在 BOLD & CURVE 中看起来还不错,但是在像 9810 torch、9790 BOLD 这样的大屏幕手机中,它需要一些非常大的默认字体。即使我通过设置更改手机的字体,它也会更改 LabelFields 和 TextFields 的字体,但应用 FontFamily 字体不会反射(reflect)在 Vector 元素上。
我附上 9800 和 9810 的屏幕截图...在 9800 中它看起来不错,在 9810 中,它看起来很大
最佳答案
试试这个
for (int x = 0; x < vector.size(); x++) {
FriendListObject b = (FriendListObject) vector.elementAt(x);
name_ = b.getf_name().toString();
}
TableRowManager row = new TableRowManager() {
public void paint(Graphics g) {
g.setBackgroundColor(0xa2b8c3);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0xe5e7e7);
g.clear();
super.paint(g);
}
};
LabelField name= new LabelField(name_+" :", DrawStyle.ELLIPSIS);
name.setFont(Font.getDefault().derive(Font.PLAIN));
row.add(name);
关于java - 无法更改黑莓中 Vector 元素的字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11153110/