text: This is your resource to discuss support topics with your peers, and learn from each other.
  09-12-2012 06:48 AM
  Hi All,
  I m new to bb java development , i want ti implement badge implementation in bb java app, means i want add one button on top right corner of another button. coding wiil be apriciated.
  Thnaks to All
  09-12-2012 06:55 AM
  i think u have to use the images means use the bitmap and implement the listner on them.
  It will be easy rather than button.
  09-12-2012 07:22 AM
  09-12-2012 07:29 AM
  You don't add another image on top of the current one, you simply replace it will another image.
  if you are talking about the application icon, you would have to do this from OS 5 and lower. However, if you are developing for OS6 and up, you can just call HomeScreen.setNewState(true, yourAppDescripter) ... That's only if you're talking about the application icon.
  09-12-2012 07:49 AM
  Use this code or add more in it according to your requirement.
  public class CustomButtonField extends MainScreen { public CustomButtonField() { add(new CustomButton()); } } public class CustomButton extends Field { Bitmap bmp = Bitmap.getBitmapResource("redBg.png"); Bitmap bmpDefault = Bitmap.getBitmapResource("callout_bg.png"); protected void layout(int width, int height) { setExtent(bmpDefault.getWidth(), bmpDefault.getHeight()); } protected void paint(Graphics graphics) { graphics.drawBitmap(0, 0, bmpDefault.getWidth(), bmpDefault.getHeight(), bmpDefault, 0, 0); graphics.drawBitmap(200, 0, bmp.getWidth(), bmp.getHeight(), bmp, 0, 0); } }