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

Siemens 6ES5 451 4UA12
Siemens 6ES5 451 4UA12  pictureSiemen 6ES5 465 4UA12
Siemen 6ES5 465 4UA12 pictureSiemens 6ES5 470-4UB13
Siemens 6ES5 470-4UB13 pictureSiemens EC56856 3" Hub
Siemens EC56856 3Siemens Motor Control PC ASY 10457646
Siemens Motor Control PC ASY 10457646 picture

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