05-16-2012 06:54 AM - edited 05-16-2012 07:54 AM
Hello,
I am developing my first blackberry application.
But I am stuck with the VerticalField and the lable field.
I want to build one UI but I am not able to implement it.
In this the text should be scrollable and in bottom check box of accept terms and Two buttons in the bottom.
Pls guide me to implement this view.
Thanks in advance,
bskania
Solved! Go to Solution.
05-16-2012 07:02 AM
05-16-2012 07:10 AM - edited 05-16-2012 07:11 AM
post your code.
and explain what u want.
05-16-2012 07:16 AM - edited 05-16-2012 07:18 AM
I had done it this way. but its not showing properly in all the device.
public GetNewPin() {
// TODO Auto-generated constructor stub
super(Manager.NO_VERTICAL_SCROLLBAR | Manager.NO_VERTICAL_SCROLL
| Manager.USE_ALL_HEIGHT);
setTitle(new CustomTitleBar("MY APP"));
// getMainManager().setBackground(
// BackgroundFactory.createSolidBackground(Color.AZUR
VerticalFieldManager _main_screen = new VerticalFieldManager(
Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR
| Manager.USE_ALL_HEIGHT) {
protected void paint(Graphics graphics) {
graphics.setBackgroundColor(Color.BISQUE);
graphics.clear();
super.paint(graphics);
};
};
LabelField _title = new LabelField("TITLE?", LabelField.FIELD_HCENTER);
SeparatorField sf = new SeparatorField();
// add UI components to Pop-up screen
_main_screen.add(_title);
_main_screen.add(sf);
VerticalFieldManager _vfm_txt_message = new VerticalFieldManager(
VERTICAL_SCROLL) {
protected void sublayout(int maxWidth, int maxHeight) {
// TODO Auto-generated method stub
super.sublayout(maxWidth, maxHeight - 70);
}
};
_vfm_txt_message.setVerticalScroll(0);
LabelField _txtMessage = new LabelField(
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."
+ CommonFunctions._msg_cost + ".", LabelField.FOCUSABLE) {
protected void paint(Graphics graphics) {
// TODO Auto-generated method stub
int[] X_PTS = new int[] { 0, getWidth(), getWidth(), 0 };
int[] Y_PTS = { 0, 0, getHeight(), getHeight() };
if (isFocus()) {
int[] drawFocusColors = new int[] { 0xededed, 0xededed,
0xededed, 0xededed };
graphics.drawShadedFilledPath(X_PTS, Y_PTS, null,
drawFocusColors, null);
}
super.paint(graphics);
}
};
_vfm_txt_message.add(_txtMessage);
_main_screen.add(_vfm_txt_message);
SeparatorField sf1 = new SeparatorField();
_main_screen.add(sf1);
final CheckboxField cbf1 = new CheckboxField(" Accept Terms", true,
FIELD_BOTTOM);
_main_screen.add(cbf1);
HorizontalFieldManager hfm = new HorizontalFieldManager(
VerticalFieldManager.FIELD_HCENTER | FIELD_BOTTOM
| USE_ALL_HEIGHT);
bf1.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
// TODO Auto-generated method stub
}
});
bf2.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
// TODO Auto-generated method stub
close();
}
});
hfm.add(bf1);
hfm.add(bf2);
_main_screen.add(hfm);
add(_main_screen);
}
05-16-2012 07:19 AM
05-16-2012 07:26 AM - edited 05-16-2012 07:27 AM
add VERTICAL_SCROLLBAR
OR wait i m trying.
actully your image is not displayed.
05-16-2012 07:36 AM
I can view that image if I am not login to the forum. Are you able to see it?
I tried with Vertical_Scrolbar property but its giving me JVM error.
05-16-2012 07:46 AM
i can not see your image ..i think u want this little bit.
05-16-2012 07:56 AM
05-16-2012 07:57 AM
have u seen my screen which i post.