在应用程序中,我已经使用image实现了BitmapButtonField。点击BitmapButton我必须整合Facebook应用程序。我搜索了bitmapButtonField的click事件,但没有任何工作。
Facebook = new BitmapButtonField(
Bitmap.getBitmapResource("facebook.png"));
Facebook.setMargin(0, 10, 0, 10);
horizontal_field.add(Facebook);
Facebook.setChangeListener(this);
如果我在触控手机上测试这个。它正在发挥作用。如果我们的设备没有触摸它不起作用。
谢谢
答案 0 :(得分:0)
您必须传递样式属性 ButtonField.CONSUME_CLICK 。因此,您可以使按钮可单击。您可以使用BitmapButtonField类的构造函数
BitmapButtonField( Bitmap normalState, Bitmap focusState, long style )
for exaple:
Facebook = new BitmapButtonField(Bitmap.getBitmapResource("facebook.png"),Bitmap.getBitmapResource("facebookFocusState.png"), ButtonField.CONSUME_CLICK);
这对我有用。在trackPad BlackBerry手机上