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

Flash Furniture HERCULES Series Premium Curved Triple Braced and Double Hinged
$40.3
Flash Furniture HERCULES Series Premium Curved Triple Braced and Double Hinged pictureSOIC8 SOP8 Flash Chip IC Test Flash Clip Socket Adapter Bios/24/25/93 Programmer
$1.99
SOIC8 SOP8 Flash Chip IC Test Flash Clip Socket Adapter Bios/24/25/93 Programmer pictureFlash Furniture Mid-Back Armless Ribbed Designer Task Chair, White
$69.13
Flash Furniture Mid-Back Armless Ribbed Designer Task Chair, White pictureFlash Furniture Wood Tray Top Receptacle in Finish, Mahogany
$164.1
Flash Furniture Wood Tray Top Receptacle in Finish, Mahogany picturepolice duty belt , flash light holder, 2 clip holder, radio holder, & 4 keepers
$40.0
police duty belt , flash light holder, 2 clip holder, radio holder, & 4 keepers picture






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