BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-20-2005, 09:49 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with Splash Screen image alignment

Please Login to Remove!

Hi,
I"m using Blackberry's splash screen sample code:
http://www.blackberry.com/knowledgec...+splash+screen

However, I'm having trouble position my PNG at the center of the screen.
For some reason, the PNG is always placed at the upper left hand corner.
The dimension of my PNG is 103 x 82.

I've already tried passing "Field.FIELD_VCENTER | Field.FIELD_HCENTER" into the super() and also "Field.USE_ALLWIDTH | Field.USE_ALL_HEIGHT | Field.FIELD_VCENTER | Field.FIELD_HCENTER"
But it's still being placed at the top left corner.

Does anyone know how I could get it centered?
Thanks
Offline  
Old 02-08-2007, 08:56 AM   #2 (permalink)
New Member
 
Join Date: Feb 2007
Model: 7100T
Carrier: Hutch
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to align an image at the middle of the Screen.

Hi,

I am begginer of BlackBerry application. I have extends FullScreen in my application. I want to display an image at the middle position of the screen. I did not find any methods to do this.
Pls Help me to go ahead.

device screen width is : 240
device screen height is : 260

and,

Image width is: 47
Image Height is :75

Thanks,

Shwarup Biswas.
Offline  
Old 02-08-2007, 10:41 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

this will place an image central horizontally:

add(new BitmapField(myBitmap, BitmapField.FIELD_HCENTER));

to get an image displaying both horizontally and vertically i'd but the above code in a screen that extends PopupScreen and push it from a background screen that extends MainScreen. - that's the easy way, you can also do it with custom fields but that involves overrides and is a little messy.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-09-2007, 04:27 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use this to center image vertically and horizontally:

add(new BitmapField(bm, Field.FIELD_HCENTER | Field.FIELD_VCENTER));
Offline  
Old 02-09-2007, 04:31 AM   #5 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i could never get FIELD_VCENTER to work properly when using anything but a single field in a screen.
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
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





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