BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



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

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
   
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
Biswas Offline
New Member
 
Posts: 11
Join Date: Feb 2007
Model: 7100T
Carrier: Hutch
Default How to align an image at the middle of the Screen. - 02-08-2007, 08:56 AM

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.
   
  (#3 (permalink)) Old
jfisher Offline
CrackBerry Addict
 
Posts: 714
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Default 02-08-2007, 10:41 AM

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!
   
  (#4 (permalink)) Old
Skipper_Joe Offline
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Posts: 237
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Default 02-09-2007, 04:27 AM

Use this to center image vertically and horizontally:

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

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!
   
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-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.