2

私はブラックベリーに不慣れです。ブラックベリーのverticalFieldManagerにフォーカスとクリックイベントを設定できますか?

これが私のコードです:

 VerticalFieldManager itemdesc=new VerticalFieldManager(Field.FOCUSABLE);


          LabelField pdtitem=new LabelField(pdts.getProducts_name(),LabelField.FOCUSABLE){
              protected void drawFocus(Graphics graphics, boolean on)    
             {          
                // setSpace(5, 5);      
                 super.drawFocus(graphics, on);  
                 }
              protected boolean navigationClick(int status, int time) {
                // TODO Auto-generated method stub
                    UiApplication.getUiApplication().pushScreen(new desc(V,j));
                return true;
            }


          };



          itemdesc.add(pdtitem);

          Bitmap cartbt=Bitmap.getBitmapResource("cart3.png");
          BitmapField cartbtn=new BitmapField(cartbt,Field.FOCUSABLE){
              protected void drawFocus(Graphics graphics, boolean on)    
             {          
                 setSpace(5, 5);      
                 super.drawFocus(graphics, on);  
                 }

              protected boolean navigationClick(int status, int time) {
                // TODO Auto-generated method stub
                  PopupScreen pp=new PopupScreen(new login());

                Dialog.alert("hai");
                UiApplication.getUiApplication().pushScreen(pp);
                return super.navigationClick(status, time);
            }
          };
4

1 に答える 1

0

新しいHorizo​​ntalFieldManagerにメソッドを追加できます

public boolean isFocusable(){
return true;

}

于 2014-06-23T16:06:23.467 に答える