views:

27

answers:

1

Here is a screenshot of the solution explorer:

alt text

And here is the code I'm using. Note that the RichTextFields do show up, but no picture. I've tried displaying both of the pictures in the res folder but no dice.

alt text

final class HelloWorldScreen extends MainScreen {
 BitmapField logoField;

 public HelloWorldScreen() {
  super();
  LabelField title = new LabelField("Moxxy Email Sender",
    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
  setTitle(title);

  add(new RichTextField("1. Where do you want to send this?"));
  add(new RichTextField("2. What's your name?"));
  add(new RichTextField("3. Write down your message:"));
  Bitmap logoImage = Bitmap.getBitmapResource("res/tip.png");
  logoField = new BitmapField(logoImage, Field.FIELD_HCENTER);
  add(logoField);
 }

 public boolean onClose() {
  Dialog.alert("Goodbye!");
  System.exit(0);
  return true;
 }

}
+1  A: 

Try removing "res" from the path in the code, i.e:

Bitmap logoImage = Bitmap.getBitmapResource("tip.png");
Marc Novakowski
Worked! Thanks a bunch!
Serg