I want to create a screen with a logo at the top of page and a ListField. I tried to create a main verticalfieldmanager, another verticalfieldmanager for logo and another verticalfieldmanager for listfield. However logo doesn't appear and listField covers all screen. How can I fix this?
Related
I need to create a screen with a Listfield and three buttons at the bottom of the screen. I tried to make a status bar and put three buttons into. The screen is displayed correctly but I just only be able to click on that buttons when traversing all items in Listfield. Please give me some helps!
You will probably need to extend the ListField, intercept the gesture you want to cause a traversal from the list to the status bar (before reaching then end of the list) and change focus programatically.
I have implemented a customized ListField with some LabelFields. Here is the screenshot.
The problem is when I scroll the ListField, the whole scroll getting scrolled. Like this Screenshot..
I want the headerfield and the Field between header and the ListField to be stationary and only the listfield get scrolled. How can I achieve this?..Please help me...
Use setBanner(Field field) to create an area at the top of your screen which will always be visible.
By the way, you almost certainly don't need a 'Back' button in the top bar (like you would on an iPhone app) because all BlackBerrys have a physical back button for this purpose. The default action for it is to close the current screen (by popping it off the screen stack) and returning to the previous screen or closing the app if there are no more screens.
You can use 2 different managers and let only the manager that has the listfield to scroll
To get a quick background of the problem please refer to
Create Transparent Mainscreen in Blackberry
.
The problem I am facing is with painting of the child on mainscreen.
I wanted my mainscreen to look transparent/translucent as an original requirement and add my other UI elements e.g. managers/field on top of it.
So the UI elements I am using are 3 BitmapField(s) which should have its thick border created using BorderFactory.createSimpleBorder() with two colors added for Field.VISUAL_STATE_FOCUS and Field.VISUAL_STATE_NORMAL states. all of these BitmapFields are added in their respective HorizontalFieldManger which in turn are added to the screen.
So part of the problem is, when I do navigation across these BitmapFields, "some area" of the border added to the BitmapFields doesn't get painted as per the state (normal, focus) specified.
Other problem is, on torch 9800 when I navigate across from top to bottom or vice versa, i see default scroll happening which should be normal however on each scroll my BitmapField leaves some tail/crack on the screen when movement happened on the scrolling.
None of such things happen when I use normal screen (not use subpaint to make the screen transparent).
Do you have any idea what's happening here..?
Big O
YMMV, but I've made a transparent screen with this:
public class TranslucentScreen extends Screen {
public TranslucentScreen() {
super(new VerticalFieldManager(USE_ALL_WIDTH | NO_VERTICAL_SCROLL));
setBackground(BackgroundFactory.createSolidTransparentBackground(0x000000, 150));
}
protected void sublayout(int width, int height) {
setPosition(0, 0);
setExtent(width, height);
setPositionDelegate(0, 0);
layoutDelegate(width, height);
}
}
This was for a basic popup screen screen I made that had a semi-transparent black background. I added a VerticalFieldManager to the screen that I controlled the background painting on so it would be how I wanted it, and then added my other Fields to that.
Actually i have build an application,which has got customized list field items.The list of items surpasses the initial screen height.So we have to do a vertical scrolling.The prob is that,the focus is working up to the last element of the initial screen height,when the initial screen height is over,then scrolling the items shows white screen.I need the default blue focus in all the items.
If you override the unfocus method to redraw your graphics the white screen will disapear
protected void onUnfocus() {
updateLayout();
}
I'm building a screen in a blackberry application and I'd like an icon/image to be to the left of it's title text.
Is there a way that this can be done?
If you're using a MainScreen, you should be able to add a HorizontalFieldManager as the title field. Then you just add the image and text to the HorizontalFieldManager.