我对编程Blackberry颇为陌生,想知道是否有人知道关于如何将图像加载到屏幕并设置onClick监听器的教程或代码片段?如何将图像转换为黑莓并设置onClick侦听器?
编辑,走到这一步:
ButtonField btf1 = new ButtonField("Fine!");
ButtonField btf2 = new ButtonField("Great!");
RichTextField rtf = new RichTextField("HELLO, HOW ARE YOU?");
Bitmap LOGO = Bitmap.getBitmapResource("1.png");
BitmapField LogoBmpField = new BitmapField(LOGO);
HelloWorldScreen()
{
setTitle("My First App");
add(rtf);
add(btf1);
add(btf2);
add(LogoBmpField);
}
谢谢!
编辑:顺便说一句,接口应该如何制作黑莓手机?只需
ButtonField btf1 = new ButtonField("Fine!");
add(btf1);
还是有一些可见的方式,如XML的Android?
还有一件事,我如何改变或设置一些对象的属性。假设我想更改我的button-btf1的标题(期望可用属性列表出现)不会给任何东西。
谢谢!不适用于BitmapField,但适用于ButtonField。 :) – Roger
请参阅上面的修改。 – Roger
哦,看起来像BitmapField不是trackwheelClick,onscreenClick方法有什么样吗? – Roger