I would add this as a comment to Nate's answer, but I don't have enough space, and I can't format the code in a comment.
I think Nate's solution works because he is using a solid colour and there is no Title or Banner area. I don't think it will work when using a bitmap or a gradient as the background and there is a title or banner.
To understand the answer you need to understand the Managers used in a MainScreen. As I understand it, there are a number of Managers used. One - the delegate Manager, is used for the whole screen. Added to this are:
- the banner Manager which is positioned at the top of the screen
- the title Manager which is positioned under the banner Manager
- the Main Manager, and
- the status Manager, which is positioned at the bottom of the screen.
The delegate Manager will provide background for all the other Managers, if they are transparent. My testing suggests that the background for the Managers for the Banner Field and Status Field are transparent. The background for the Manager for the Title Field is not - it is black - but changing it appears problematic.
Anyway, in my testing, to match the requirement, all you need to do is set the delegate Manager's background as required, and set the MainManager's background to transparent.
The following code is set up in a way that I think answers the question. However I have also left a number of commented out lines that I suggest you uncomment and note the effect. It is interesting (at least to a sad person like me).
Background transparentBackground = BackgroundFactory.createSolidTransparentBackground(0, 0);
Background gradientBackground = BackgroundFactory.createLinearGradientBackground(0X00909090, 0x00808080, 0x00E0E0E0, 0x00E8E8E8);
getMainManager().setBackground(transparentBackground);
getDelegate().setBackground(gradientBackground);
// this is the same as this.setBackground(gradientBackground);
LabelField banner = new LabelField("Hello Banner");
// banner.setBackground(gradientBackground);
setBanner(banner);
// LabelField title = new LabelField("Hello Title");
// title.setBackground(transparentBackground);
// setTitle(title);
// title.getManager().setBackground(transparentBackground);
LabelField status = new LabelField("Hello Status");
// status.setBackground(gradientBackground);
setStatus(status);
LabelField content = new LabelField("Hello Content", LabelField.FOCUSABLE);
content.setBackground(transparentBackground);
add(content);
// Following just added so that focus can be moved off the content LabelField
add(new NullField());
Finally, can I recommend this article for some interesting reading on MainScreen.
MainScreen explained