usar playbook para imagenes como analisis 64gb 32gb 16gb blackberry tabs fieldmanager

playbook - tablet blackberry 32gb



Uso del administrador de campo vertical con el administrador de campo de párpados en blackberry (0)

Creé 3 pestañas en mi aplicación Blackberry. Ahora quiero agregar un administrador de campo de párpados que permita un componente de párpados solo en la tercera pestaña.

Con el código actual, puedo crear un párpado pero no me muestra ninguna de las pestañas.

// setup the tab model with 3 tabs final PaneManagerModel model = new PaneManagerModel(); model.enableLooping( true ); // setup the first tab VerticalFieldManager vfm = new VerticalFieldManager( Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH | Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL ); LabelField lbl = new LabelField( "Content for tab 1", Field.FOCUSABLE ); vfm.add( lbl ); ButtonField _btnGoBack = new ButtonField(" Tab 3 ",ButtonField.FIELD_HCENTER | ButtonField.CONSUME_CLICK); _btnGoBack.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field field,int context) { System.out.println("Inside button"); jumpTo(2,PaneManagerView.DIRECTION_NONE); } }); vfm.add(_btnGoBack); MyLabelField myLbl = new MyLabelField( "Tab 1" ); NullField nullFld = new NullField( Field.FOCUSABLE ); HorizontalFieldManager hfm = new HorizontalFieldManager(); hfm.add( nullFld ); hfm.add( myLbl ); Pane pane = new Pane( hfm, vfm ); model.addPane( pane ); // setup the second tab vfm = new VerticalFieldManager( Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH | Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL ); lbl = new LabelField( "Content for tab 2", Field.FOCUSABLE ); vfm.add( lbl ); myLbl = new MyLabelField( "Tab 2" ); nullFld = new NullField( Field.FOCUSABLE ); hfm = new HorizontalFieldManager(); hfm.add( nullFld ); hfm.add( myLbl ); pane = new Pane( hfm, vfm ); model.addPane( pane ); //Setup the third tab vfm = new VerticalFieldManager( Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH | Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL ); lbl = new LabelField( "Content for tab 3", Field.FOCUSABLE ); vfm.add( lbl ); myLbl = new MyLabelField( "Tab 3" ); nullFld = new NullField( Field.FOCUSABLE ); hfm = new HorizontalFieldManager(); hfm.add( nullFld ); hfm.add( myLbl ); ((LabelField)myLbl).setEnabled(false); ((NullField)nullFld).setEnabled(false);

Aquí comienzo la implementación del administrador de campo de párpados

_eyelidFieldManager = new EyelidFieldManager(); // Change the display time from the default 1.2s _eyelidFieldManager.setEyelidDisplayTime(2000); // Add components to the north eye-lid of the blinker _eyelidFieldManager.vfm.addTop(new LabelField(" Do you wish to send report to client?",LabelField.FIELD_HCENTER | LabelField.NON_FOCUSABLE)); _eyelidFieldManager.addTop(new LabelField(" ",LabelField.FIELD_HCENTER | LabelField.NON_FOCUSABLE)); // Add components to the south eye-lid of the blinker _eyelidFieldManager.addBottom(new LabelField(" Send Report as: ",LabelField.FIELD_HCENTER | LabelField.NON_FOCUSABLE)); HorizontalFieldManager buttonPanel = new HorizontalFieldManager(Field.FIELD_HCENTER | Field.USE_ALL_WIDTH); buttonPanel.add(new ButtonField("SMS")); buttonPanel.add(new ButtonField("Email")); _eyelidFieldManager.addBottom(buttonPanel); // Add checkbox in non-eyelid region for showing eyelids on user input _showOnInputCheckbox = new CheckboxField("Show eyelids on user input", true, Field.FIELD_HCENTER); _showOnInputCheckbox.setChangeListener(this); add(_eyelidFieldManager); // Disable virtual keyboard so it doesn''t obscure bottom eyelid VirtualKeyboard keyboard = getVirtualKeyboard(); if( keyboard != null ) { keyboard.setVisibility(VirtualKeyboard.IGNORE); } pane = new Pane( hfm, vfm ); model.addPane( pane ); // select the tab to be displayed model.setCurrentlySelectedIndex( 0 );

Ahora configura el resto de los componentes de la pestaña

// setup the rest of the components HorizontalTabTitleView titleView = new HorizontalTabTitleView( Field.FOCUSABLE ); titleView.setNumberOfDisplayedTabs( 3 ); titleView.setModel( model ); PaneView paneView = new PaneView( Field.FOCUSABLE ); paneView.setModel( model ); PaneManagerView view = new PaneManagerView( Field.FOCUSABLE | Manager.NO_VERTICAL_SCROLL | Manager.NO_HORIZONTAL_SCROLL | Manager.USE_ALL_HEIGHT | Manager.USE_ALL_WIDTH, titleView, paneView ); view.setModel( model ); model.setView( view ); // configure the Controller HorizontalTabController controller = new HorizontalTabController(); controller.setModel( model ); controller.setView( view ); model.setController( controller ); view.setController( controller ); // add the tab manager to the MainScreen this.add( view ); }

Cualquiera que esté al tanto de una solución, por favor guía. Gracias