Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
herahadi
Posts: 27
Registered: ‎02-20-2013
My Device: 9900
My Carrier: Telkomsel

background for field manager not show up for blackberry 5

hello, i have made an application that should be run on os 5,6,7

 

this application run smooth on os 6 and 7 but for os 5 its background wont show up. here my snippet code

 

this.add(hfm);
		
		Bitmap footerBGBitmap = Bitmap.getBitmapResource("footer.png");
		Bitmap footerBGResized = GPATools.ResizeTransparentBitmap(footerBGBitmap, footerBGBitmap.getWidth(), hfm.getPreferredHeight(),
				Bitmap.FILTER_LANCZOS, Bitmap.SCALE_STRETCH);
		Background footerBG = BackgroundFactory.createBitmapBackground(footerBGResized,Background.POSITION_X_LEFT,Background.POSITION_Y_TOP,Background.REPEAT_HORIZONTAL);
		
		hfm.setBackground(footerBG);

 this field manager will be placed on setStatus()

 

what i should change to the code to make my background appears?

 

thank you

Please use plain text.
Developer
simon_hain
Posts: 16,093
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: background for field manager not show up for blackberry 5

did you compile it with 5.0?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
herahadi
Posts: 27
Registered: ‎02-20-2013
My Device: 9900
My Carrier: Telkomsel

Re: background for field manager not show up for blackberry 5

yes i compiled it with 5.0

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: background for field manager not show up for blackberry 5

Hi @herahadi

 

It's a long shot, but try setting the background before adding the hfm.

 

E.

Please use plain text.
Contributor
herahadi
Posts: 27
Registered: ‎02-20-2013
My Device: 9900
My Carrier: Telkomsel

Re: background for field manager not show up for blackberry 5

[ Edited ]

actually the background is appears on the left, but its can not repeat horizontally

 

i tried to enlarge the image same as the display weight and its appears. so the problem is that Background.REPEAT_HORIZONTAL syntax is not working on blackberry 5.

 

what syntak i should used on os 5 to make my background repeat horizontally then?

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: background for field manager not show up for blackberry 5

Please use plain text.