blackberry - How to use a button in a VerticalFieldManager to change parent screen? -
i have button in verticalfieldmanager. if user clicks on it, want wipe out screen , load new verticalfieldmanager.
currently in homepage, call custom manager returns verticalfieldmanager. because code builds verticalfieldmanager not on homepage , not extend mainscreen, doesn't have access screen methods.
how can go fixing issue?
if i'm understanding correctly screen has manager , manager has button want modify screen. this:
buttonfield button = new buttonfield("button"); button.setchangelistener(new fieldchangelistener(){ public void fieldchanged(field field, int context) { //the manager of field should verticalfieldmanager //and manager of should screen. manager screen = field.getmanager().getmanager(); screen.deleteall(); //now create new verticalfieldmanager , add whatever want } });
Comments
Post a Comment