BlackBerry窗口标题不仅仅可以是文字,也可以是Field(比如图片),甚至Manager(比如Manager中嵌入图片和文字)。
HorizontalFieldManager mgr = new HorizontalFieldManager();
Bitmap image = Bitmap.getBitmapResource("icon0001.PNG");
BitmapField icon = new BitmapField(image, BitmapField.NON_FOCUSABLE);
mgr.add(icon);
mgr.add(new LabelField("Hello World Demo"));
setTitle(mgr);
运行结果如图:

本文介绍了如何在BlackBerry应用中设置包含图片和文字的窗口标题。通过创建HorizontalFieldManager并添加BitmapField和LabelField,实现了复合型的标题样式。
1490

被折叠的 条评论
为什么被折叠?



