BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 09-01-2010, 08:42 AM   #1 (permalink)
New Member
SergioTapia's Avatar
Join Date: Aug 2010
Model: 7100T
Carrier: asdfasdf
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot add a picture to my application UI.

Please Login to Remove!

Here is a screenshot of the solution explorer:
cant because of post count? wtf?

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.

final class HelloWorldScreen extends MainScreen {
	BitmapField logoField;

	public HelloWorldScreen() {
		LabelField title = new LabelField("Moxxy Email Sender",
				LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
		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);

	public boolean onClose() {
		return true;

Old 09-01-2010, 09:49 AM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

Make sure you are checking "logoImage" for null - this is what you will get if getBitmapResource() cannot locate the resource.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

11.0592MHz Crystal HC-49S Low Profile.100pcs
11.0592MHz Crystal HC-49S Low Profile.100pcs pictureCRYSTAL DIGITAL TEST GAUGE ( 1000 PSI )
CRYSTAL DIGITAL TEST GAUGE ( 1000 PSI )  picturePrecision RF12 High Frequency Crystal Probe
Precision RF12 High Frequency Crystal Probe pictureVintage HOYA Japan Crystal Large Ash Tray 8 inches
Vintage HOYA Japan Crystal Large Ash Tray 8 inches picture24.576MHz Crystal HC-49S Low Profile.20pcs
24.576MHz Crystal HC-49S Low Profile.20pcs picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.