05-27-2009 02:18 PM - edited 05-27-2009 03:14 PM
Can someone explain whats wrong with the background>
import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.decor.*;
public class WhaleApp extends UiApplication {
public static void main(String[] args) {
WhaleApp theApp = new WhaleApp();
theApp.enterEventDispatcher();
}
public WhaleApp() {
pushScreen(new SearchScreen());
}
}
final class SearchScreen extends MainScreen {
private UiApplication _app;
public SearchScreen() {
super();
LabelField lbl = new LabelField("Blah");
add(lbl);
_app = UiApplication.getUiApplication();
Manager manageLayout = new FlowFieldManager(FlowFieldManager.FIELD_HCENTER);
LocationScreen popUp = new LocationScreen(manageLayout);
_app.pushGlobalScreen(popUp, 1, UiEngine.GLOBAL_MODAL);
}
protected void paintBackground( Graphics g ) {
super.paintBackground( g );
Bitmap bgBitmap = Bitmap.getBitmapResource("bubblesweee.png");
this.setBackground(BackgroundFactory.createBitmapB
}
public boolean onClose() {
Dialog.alert("Goodbye!");
System.exit(0);
return true;
}
}
Solved! Go to Solution.
05-27-2009 03:18 PM
Check this knowledge base article:
05-27-2009 03:20 PM
05-27-2009 03:22 PM
05-27-2009 03:25 PM
Thanks I got it working.
The LocationScreen was a popup however I got that working using:
_app.pushGlobalScreen(popUp, 1, true); (which is depreciated)
However is there a better way to do this?
I tried:
_app.pushGlobalScreen(popUp, 1, UiEngine.GLOBAL_MODAL);
But it couldn't find the UiEngine.
05-27-2009 04:44 PM - edited 05-27-2009 04:46 PM