03-03-2010 05:28 AM - edited 03-03-2010 06:12 AM
Hello,
know I had managed that the 1st HFM is everytime on top of the screen I have another problem! When I add a Field to the 2nd HFM and I start this app I dont see this field, because it is behind the 1st HFM and I have to scroll above to see this. Can anyone help me?
Here is my code:
VerticalFieldManager fieldManagerAll = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH | NO_VERTICAL_SCROLL){
protected void subpaint(Graphics graphics){
int height = Display.getHeight();
int width = Display.getWidth();
super.sublayout(width, height);
}
};
// VerticalFieldManager contains title
VerticalFieldManager fieldManagerTop = new VerticalFieldManager(Field.USE_ALL_WIDTH | NO_VERTICAL_SCROLL){
protected void subpaint(Graphics graphics){
int height = Display.getHeight() / 8;
int width = Display.getWidth();
super.sublayout(width, height);
}
};
VerticalFieldManager fieldManagerMiddle = new VerticalFieldManager(USE_ALL_WIDTH | VERTICAL_SCROLL){
protected void subpaint(Graphics graphics){
int height = (Display.getHeight() / 8) * 5;
int width = Display.getWidth();
super.sublayout(width, height);
}
};
// all fields for title
// all fields for the middle
HorizontalFieldManager middleTop = new HorizontalFieldManager(){
protected void subpaint(Graphics graphics){
int height = (Display.getHeight());//) / 12) * 5;
int width = Display.getWidth();
super.sublayout(width, height);
}
};
HorizontalFieldManager middleTopLeft = new HorizontalFieldManager(HorizontalFieldManager.FIEL D_HCENTER){
protected void subpaint(Graphics graphics){
int height = (Display.getHeight() / 12) * 5;
int width = Display.getWidth() / 2;
super.sublayout(width, height);
}
};
Bitmap symbol = Bitmap.getBitmapResource("ressources/100000.png");
BitmapField symbolField = new BitmapField(symbol, Field.FOCUSABLE);
middleTopLeft.add(symbolField);
VerticalFieldManager middleTopRight = new VerticalFieldManager(){
protected void subpaint(Graphics graphics){
int height = (Display.getHeight() / 12) * 5;
int width = Display.getWidth() / 2;
super.sublayout(width, height);
}
};
middleTop.add(middleTopLeft);
middleTop.add(middleTopRight);
fieldManagerMiddle.add(middleTop);
fieldManagerAll.add(fieldManagerTop);
fieldManagerAll.add(fieldManagerMiddle);
add(fieldManagerAll);The added Bitmap isn't schown on the screen, I have to scroll!
Best regards
Maja
Solved! Go to Solution.
03-03-2010 06:51 AM
nobody understand what I mean?
03-03-2010 07:05 AM
wow ur code is very messy,
Refer this, it might help.
http://devsushi.com/2007/12/02/blackberry-jde-api-
If you can tell me what sort of layout you are trying to achieve, maybe I can help you out. Draw it out in photoshop or paint or something
03-03-2010 07:29 AM
ok I would try ![]()
--------------------------------------------------
|
| title
|
--------------------------------------------------
|
|
|
| main screen
|
|
|
|
--------------------------------------------------
|
| status
|
--------------------------------------------------
So this is what I have. The title is without setTitle(), see this thread
And know I have the following problem:
The first fields I want to add to the main screen will not be shown. I have to scroll up! Because the fields are behind the title! Know I want, that the fields are shown directly!
was this understandable?
03-03-2010 09:52 AM
ok I solved the problem! When I don't set width and height it work! ![]()