List of all Iphone and Blackberry Development codes in a one click Iphone,objective C,xcode,blackberry Development,iOS Development

Monday, April 16, 2012

Display ToolBar with auto closing feature in Blackberry








EncodedImage e1 = EncodedImage.getEncodedImageResource("home.png");
EncodedImage e2 = EncodedImage.getEncodedImageResource("map.png");
EncodedImage e3 = EncodedImage.getEncodedImageResource("members.png");
EncodedImage e4 = EncodedImage.getEncodedImageResource("message.png");
EncodedImage e5 = EncodedImage.getEncodedImageResource("settings.png");
EncodedImage e6 = EncodedImage.getEncodedImageResource("logout.png");


EyelidFieldManager manager = new EyelidFieldManager();
HorizontalFieldManager buttonPanel = new HorizontalFieldManager(Field.FIELD_TOP | Field.USE_ALL_WIDTH);
VerticalFieldManager vfm=new VerticalFieldManager();
vfm.add(new LabelField("Map"));
vfm.add(new BitmapField(e2.getBitmap(),FOCUSABLE){
  protected boolean navigationClick(int status, int time){
      
     Dialog.alert("MAP");
     return true;
    }
});
buttonPanel.add(vfm);
buttonPanel.add(new LabelField("  "));
VerticalFieldManager vfm1=new VerticalFieldManager();
vfm1.add(new LabelField("Members"));
vfm1.add(new BitmapField(e3.getBitmap(),FOCUSABLE){
  protected boolean navigationClick(int status, int time){
      
     Dialog.alert("Members");
     return true;
    }
});
buttonPanel.add(vfm1);
VerticalFieldManager vfm2=new VerticalFieldManager();
vfm2.add(new LabelField("Message"));
vfm2.add(new BitmapField(e4.getBitmap(),FOCUSABLE){
  protected boolean navigationClick(int status, int time){
      
     Dialog.alert("Message");
     return true;
    }
});
buttonPanel.add(vfm2);
VerticalFieldManager vfm3=new VerticalFieldManager();
vfm3.add(new LabelField("Settings"));
vfm3.add(new BitmapField(e5.getBitmap(),FOCUSABLE){
  protected boolean navigationClick(int status, int time){
      
     Dialog.alert("Settings");
     return true;
    }
});
buttonPanel.add(vfm3);
VerticalFieldManager vfm4=new VerticalFieldManager();
vfm4.add(new LabelField("Logout"));
vfm4.add(new BitmapField(e6.getBitmap(),FOCUSABLE){
  protected boolean navigationClick(int status, int time){
      
     Dialog.alert("Logout");
     return true;
    }
});
buttonPanel.add(vfm4);
manager.setEyelidDisplayTime(5000);
manager.add(buttonPanel);
add(manager);








        

1 comment: