开发者

Field change event for ButtonField and BitmapField in Blackberry 4.6

开发者 https://www.devze.com 2023-02-12 10:00 出处:网络
I am trying an app that has BitmapField and ButtonField too. When I click the BitmapField the field change event raise the BitmapField change and also ButtonField change event which 开发者_运维问答is

I am trying an app that has BitmapField and ButtonField too. When I click the BitmapField the field change event raise the BitmapField change and also ButtonField change event which 开发者_运维问答is clicked before BitmapField in BlackBerrry 4.6.


You should start with the RIM 4.6 API documentation. Both ButtonField and BitmapField extend the Field class. That means that you can override methods from that class. The methods that might interest you are fieldChangeNotify and navigationClick.

ButtonField button = new ButtonField("Button1") {
   protected boolean navigationClick(int status, int time) {
      //code to handle click
   }
   protected void fieldChangeNotify(int context) {
      //code to handle field change(focus/unfocus/etc.)
   }
};
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号