我想更改BitmapField圖像onFocus和onUnfocus,並且我需要一個onClick事件。我怎樣才能做到這一點?這是我的代碼,但它正在發起焦點更改事件。BlackBerry BitmapField on focus change and click listener
public class ClickbleImage extends BitmapField {
public ClickbleImage(Bitmap bitmap,long style) {
super(bitmap,style);
}
public boolean isFocusable() {
return true;
}
protected boolean navigationClick(int status, int time) {
fieldChangeNotify(0);
return true;
}
protected void onFocus(int direction) {
this.setBitmap(Bitmap.getBitmapResource("img/editfocus.jpg"));
super.onFocus(direction);
}
protected void onUnfocus() {
this.setBitmap(Bitmap.getBitmapResource("img/edit.png"));
super.onUnfocus();
}
}
你是否檢查過你點擊位圖fiels然後點擊導航點擊 – Swati 2010-12-14 12:56:08