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
PIN: N/A
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.


Code:
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;
	}

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

Make sure you are checking "logoImage" for null - this is what you will get if getBitmapResource() cannot locate the resource.
Offline  
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
$250.0
Siemens 6ES5 451 4UA12  pictureSiemen 6ES5 465 4UA12
$250.0
Siemen 6ES5 465 4UA12 pictureSiemens 6ES5 470-4UB13
$850.0
Siemens 6ES5 470-4UB13 pictureSiemens EC56856 3" Hub
$9.99
Siemens EC56856 3Siemens Motor Control PC ASY 10457646
$400.0
Siemens Motor Control PC ASY 10457646 picture






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