ListStyleButtonField

Why the eclipse can not find this class? I use the JDE 5.0. does anyone know the import for her?

Thanks in advance

What is a sample of here?

http://supportforums.BlackBerry.com/T5/Java-development/implement-advanced-buttons-fields-and-manage...

Tags: BlackBerry Developers

Similar Questions

  • How to operate the ListStyleButtonField!

    Hello

    I have a question about the ListStyleButtonField. How can I make each field in the list to go to a screen spicific class?

    FirstField = ListStyleButtonField

    new ListStyleButtonField (button1left, 'Customer', buttonRight, 0);

    () firstField.setChangeListener

    ce) ;

    Add (firstField);

    ListStyleButtonField = secondField

    new ListStyleButtonField (button2left, 'Contract', buttonRight, 0);

    Add (secondField);

    as it is not in the API, you must link to the source:
    http://supportforums.BlackBerry.com/T5/Java-development/implement-advanced-buttons-fields-and-manage...

    or directly
    https://github.com/BlackBerry/samples-for-Java/BLOB/master/advanced%20UI/src/com/samples/Toolkit/UI/...

    as you can see in the source code, all actions invoke a fieldchange event. This can be captured with a fieldchangelistener, that you are adding it only to the first field (perhaps you obmitted the second).

    If you implement fieldchanged in your screen you must discern whence the event. to do this, declare the fields on the scope of the screen and check if the parameter of the method fieldchanged field is the field you need.

    example:
    ' Public Sub fieldChanged (field field, int context) {}
    If (context! = FieldChangeListener.PROGRAMMATIC) {}
    If (field == okButton) {}

  • Detect what his selection ListStyleButtonField

    Hi... I'm trying to use ListStyleButtonField (Pentecost cells) for my application... but has a problem its because I put 10 ListStyleButtonField in the screen, so when the user ' click on ' for example in line 5, I loop and try to identify what his clicked ListStyleButtonField, and when identity I'm going to the new screen and send parameters...

    I use this code but I think that what not it is the best way... everything?

    public void fieldChanged(Field field, int context) {
            int j=0;
            for(int i=0;i			 

    There is nothing inherently wrong with your code, unless you use == to do a string comparison that is a trap for new Java programmers - don't forget, for strings, you should use equals().  But you assume that only your domain will give a toString() that matches items in your table.

    Personally, I think I would check that the field is actually a ListStyleButtonField and then uses a method specific to this field to get his Label.  I don't know that field, so we will admit that there a method getLabel().  I think that all code like this (not compiled, just written, I hope, explain the principles even if you can not just copy and paste):

    public void fieldChanged(Field field, int context) {
    if ( field instanceof ListStyleButtonField ) {
    ListStyleButtonField lsbf = (ListStyleButtonField) field
    String textToCompare = lsbf.getLabel();
            int j=0;
            for(int i=0;i		   
  • String following line - Style field list button

    Hi all

    Below I have attached two images of liststylebuttonfield,

    1. in the first picture

    True line-'connected to 3 organization... ". ', display line-'connected to 3 organization... ". »

    the remaining letters are present in the background of the image.

    I give the width = totalwidth - lefticon.getwidth ();

    2. in the second picture

    True line-'connected to 3 organization... ". ', display line-"Connected to eveniment 3.

    the remaining letters are hiding.

    I give the width = totalwidth - lefticon.getwidth () - balloonIcon.getwidth () - actionIcon.getwidth ();

    How to give to the next line of width/auto for this problem.

    Below I attach my code for your reference...

    package com.samples.toolkit.ui.component;
    
    import java.util.Calendar;
    
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.system.Characters;
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.TouchEvent;
    import net.rim.device.api.ui.Touchscreen;
    import net.rim.device.api.ui.Ui;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    
    public class TestFeedListStyleField extends Field {
        Font myFont = Font.getDefault().derive(Font.SERIF_STYLE,5, Ui.UNITS_pt);
        Font myFont1 = Font.getDefault().derive(Font.BOLD,5, Ui.UNITS_pt);
        public static int DRAWPOSITION_TOP = 0;
        public static int DRAWPOSITION_BOTTOM = 1;
        public static int DRAWPOSITION_MIDDLE = 2;
        public static int DRAWPOSITION_SINGLE = 3;
        private static final int CORNER_RADIUS = 18;
        private static final int HPADDING = Display.getWidth() <= 320 ? 6 : 8;
        private static final int VPADDING = 4;
    
        private static final int COLOR_BACKGROUND = 0xFFFFFF;
        private static final int COLOR_BORDER = 0xBBBBBB;
        private static final int COLOR_BACKGROUND_FOCUS = 0x186DEF;
         public MyLabelField _labelField,_labelField1, _labelField2,_labelField3;
    
         private Bitmap _caret;
         private int _rightOffset;
            private int _leftOffset;
            private int _labelHeight,_labelHeight1,_labelHeight2,_labelHeight3;
            private Bitmap _leftIcon;
            private Bitmap _actionIcon;
            private Bitmap _ballon;
            private int _drawPosition = -1;
            private String _labelField1test;
    
        public TestFeedListStyleField(Bitmap icon,String label, String label1, String lable2,String lable3, Bitmap balloon,Bitmap caret,
                long style) {
             super( USE_ALL_WIDTH | Field.FOCUSABLE );
            _leftIcon = icon;
             _labelField = new MyLabelField(label, style );
             _labelField1 = new MyLabelField(label1, style );
             _labelField2=new  MyLabelField(lable2,style);
            _labelField3=new  MyLabelField(lable3,style);
            _ballon=balloon;
            _actionIcon=caret;
            _labelField1test=label1;
            _labelField.setFont(myFont);
            _labelField1.setFont(myFont);
            _labelField2.setFont(myFont1);
            _labelField3.setFont(myFont);
    //      Imagelistner imglistner = new Imagelistner();
    //      _actionIcon.
        }
    
        public TestFeedListStyleField(String label, String label1, String lable2,Bitmap caret,
                long style) {
             super( USE_ALL_WIDTH | Field.FOCUSABLE );
             _labelField = new MyLabelField(label, style );
             _labelField1 = new MyLabelField(label1, style );
             _labelField2=new  MyLabelField(lable2,style);
            _actionIcon=caret;
            _labelField1test=label1;
            _labelField1.setFont(myFont);
            _labelField2.setFont(myFont);
    //      Imagelistner imglistner = new Imagelistner();
    //      _actionIcon.
        }
    
        public void setDrawPosition( int drawPosition )
        {
            _drawPosition = drawPosition;
        }
         public String toString()
            {
                return _labelField.toString();
            }
    
        protected void layout(int width, int height) {
            if( Touchscreen.isSupported() ) {
            }
    
            _leftOffset = HPADDING;
            if( _leftIcon != null ) {
                _leftOffset += _leftIcon.getWidth() + HPADDING;
            }
    
            _rightOffset = HPADDING;
            if( _caret != null ) {
                _rightOffset += _caret.getWidth() + HPADDING;
            }
            _labelField.layout( width - _leftOffset - _rightOffset, height );
            _labelHeight = _labelField.getHeight();
            int labelWidth = _labelField.getWidth();
    
            _labelField1.layout( width - _leftOffset - _rightOffset, height );
            _labelHeight1 = _labelField1.getHeight();
            int labelWidth1 = _labelField1.getWidth();
    
            _labelField2.layout( width - _leftOffset - _rightOffset, height );
            _labelHeight2 = _labelField2.getHeight();
            int labelWidth2 = _labelField2.getWidth();
    
            _labelField3.layout( width - _leftOffset - labelWidth1 - _rightOffset, height );
            _labelHeight3 = _labelField3.getHeight();
            int labelWidth3 = _labelField3.getWidth();
    
            if( _labelField.isStyle( DrawStyle.HCENTER ) ) {
                _leftOffset = ( width - labelWidth ) / 2;
            } else if ( _labelField.isStyle( DrawStyle.RIGHT ) ) {
                _leftOffset = width - labelWidth - HPADDING - _rightOffset;
            }
    
            if( _labelField1.isStyle( DrawStyle.HCENTER ) ) {
                _leftOffset = ( width - labelWidth1 ) / 2;
            } else if ( _labelField.isStyle( DrawStyle.RIGHT ) ) {
                _leftOffset = width - labelWidth1 - HPADDING - _rightOffset;
            }
            if( _labelField2.isStyle( DrawStyle.HCENTER ) ) {
                _leftOffset = ( width - labelWidth2 ) / 2;
            } else if ( _labelField.isStyle( DrawStyle.RIGHT ) ) {
                _leftOffset = width - labelWidth2 - HPADDING - _rightOffset;
            }
    
            int extraVPaddingNeeded = 0;
    //      if( _labelHeight < _targetHeight ) {
    //          // Make sure that they are at least 1.5 times font height
    //          extraVPaddingNeeded =  ( _targetHeight - _labelHeight ) / 2;//( _targetHeight - _labelHeight ) / 2;
    //      }
            if( _leftIcon != null ) {
                  if( _labelHeight+_labelHeight1 < _leftIcon.getHeight() ) {
                      // Make sure that they are at least 1.5 times font height
                      extraVPaddingNeeded =  _leftIcon.getHeight();//( _targetHeight - _labelHeight ) / 2;
                  }
                  else if( _labelHeight+_labelHeight1 > _leftIcon.getHeight() ){
                    extraVPaddingNeeded =  _labelHeight+_labelHeight1;
                  }
            }
            else{
                if( _labelHeight+_labelHeight1 < _actionIcon.getHeight() ) {
                      // Make sure that they are at least 1.5 times font height
                      extraVPaddingNeeded =  _leftIcon.getHeight();//( _targetHeight - _labelHeight ) / 2;
                  }
                  else if( _labelHeight+_labelHeight1 > _actionIcon.getHeight() ){
                    extraVPaddingNeeded =  _labelHeight+_labelHeight1;
                  }
            }
    
          setExtent( width,  (int) (extraVPaddingNeeded*1.1) );
    
        }
          public void setText( String text )
            {
                _labelField.setText( text );
                updateLayout();
            }
    
        protected void paint(Graphics g) {
    
            // Left Bitmap
            if( _leftIcon != null ) {
                g.drawBitmap( HPADDING, VPADDING, (int) (_leftIcon.getWidth()*2), (int) (_leftIcon.getHeight()*3), _leftIcon, 0, 0 );
            }
    
    //        // Text  ( getHeight() - _labelHeight ) / 2, ( getHeight() - _actionIcon.getHeight() ) / 2,  //(int) (VPADDING*.5)
            try {
                g.pushRegion( _leftOffset, (int) (VPADDING*.5), getWidth() - _leftOffset - _rightOffset, _labelHeight, 0, 0 ); //getWidth() - _leftOffset - _rightOffset
                _labelField.paint( g );
            } finally {
                g.popContext();
            }
    
            try {
                g.pushRegion(  (int) (getWidth() - _leftIcon.getWidth()*.6 ), (int) (VPADDING*.5), getWidth() - _leftOffset - _labelField1.getWidth()- _rightOffset, _labelHeight3, 0, 0 ); //getWidth() - _leftOffset - _rightOffset
                _labelField3.paint( g );
            } finally {
                g.popContext();
            }
    
            try {
                g.pushRegion(_leftOffset, _labelHeight, getWidth() - _leftOffset - _rightOffset, _labelHeight1, 0, 0 ); //getWidth() - _leftOffset - _rightOffset
    //            String test6=_labelField1test.charAt(0)+" ".toString();
    //
    //            if(test6.trim().equals("0")){
    ////                 Dialog.alert("Success....");
    //             }
    //             else{
    //               Dialog.alert("Failure....");
                    _labelField1.paint( g );
    //             }
            } finally {
                g.popContext();
            }
    
            if( _leftIcon != null ) {
                try {
                    g.pushRegion((int) (HPADDING+_leftIcon.getWidth()), (int) (_labelHeight*1.5+_labelHeight1), getWidth() - (_leftIcon.getWidth()*2 ), (int) ((_leftIcon.getHeight()-_labelHeight-_labelHeight1)*.9),5, 5 ); //getWidth() - _leftOffset - _rightOffset
    //              g.pushRegion((int) (HPADDING+_leftIcon.getWidth()*1.1), (int) (_labelHeight*1.5+_labelHeight1), (int) (getWidth() - _leftIcon.getWidth()- _ballon.getWidth()- _actionIcon.getWidth()), (int) ((_leftIcon.getHeight()-_labelHeight-_labelHeight1)*.9), 0, 0 ); //getWidth() - _leftOffset - _rightOffset
                    _labelField2.paint( g );
                } finally {
                    g.popContext();
                }
            }
            // Right (Action) Bitmap
            if( _actionIcon != null ) {
                g.drawBitmap(  (int) (getWidth() - _leftIcon.getWidth()*.6 ), (int) (VPADDING*7.8), _ballon.getWidth(), _ballon.getHeight(), _ballon, 0, 0 );
                g.drawBitmap( getWidth() - HPADDING - _actionIcon.getWidth(), (int) (VPADDING*7), _actionIcon.getWidth(), _actionIcon.getHeight(), _actionIcon, 0, 0 );
            }
    
            // BootomGrid
    //        g.drawBitmap( (int) (HPADDING+_leftIcon.getWidth()*1.3), _labelHeight+_labelHeight1, 0, 0, _actionIcon, _drawPosition, _drawPosition );
    //        g.drawBitmap( (int) (HPADDING+_leftIcon.getWidth()*1.3), _labelHeight+_labelHeight1,  0, 0, _actionIcon, _drawPosition, _drawPosition );
    //        g.drawBitmap( (int) (HPADDING+_leftIcon.getWidth()*1.3), _labelHeight+_labelHeight1,  0, 0, _actionIcon, _drawPosition, _drawPosition );
    //        g.drawBitmap( (int) (HPADDING+_leftIcon.getWidth()*1.3), _labelHeight+_labelHeight1,  0, 0, _actionIcon, _drawPosition, _drawPosition );
    //        g.drawBitmap( (int) (HPADDING+_leftIcon.getWidth()*1.3), _labelHeight+_labelHeight1,  0, 0, _actionIcon, _drawPosition, _drawPosition );
    //
        }
    
        protected void paintBackground( Graphics g )
        {
            if( _drawPosition < 0 ) {
                // it's like a list field, let the default background be drawn
                super.paintBackground( g );
                return;
            }
    
            int oldColour = g.getColor();
    
            int background = g.isDrawingStyleSet( Graphics.DRAWSTYLE_FOCUS ) ? COLOR_BACKGROUND_FOCUS : COLOR_BACKGROUND; //COLOR_BACKGROUND_FOCUS
            try {
                if( _drawPosition == 0 ) {
                    // Top
                    g.setColor( background );
                    g.fillRoundRect( 0, 0, getWidth(), getHeight() + CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                    g.setColor( COLOR_BORDER );
                    g.drawRoundRect( 0, 0, getWidth(), getHeight() + CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                    g.drawLine( 0, getHeight() - 1, getWidth(), getHeight() - 1 );
                } else if( _drawPosition == 1 ) {
                    // Bottom
                    g.setColor( background );
                    g.fillRoundRect( 0, -CORNER_RADIUS, getWidth(), getHeight() + CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                    g.setColor( COLOR_BORDER );
                    g.drawRoundRect( 0, -CORNER_RADIUS, getWidth(), getHeight() + CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                } else if( _drawPosition == 2 ) {
                    // Middle
                    g.setColor( background );
                    g.fillRoundRect( 0, -CORNER_RADIUS, getWidth(), getHeight() + 2 * CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                    g.setColor( COLOR_BORDER );
                    g.drawRoundRect( 0, -CORNER_RADIUS, getWidth(), getHeight() + 2 * CORNER_RADIUS, CORNER_RADIUS, CORNER_RADIUS );
                    g.drawLine( 0, getHeight() - 1, getWidth(), getHeight() - 1 );
                } else {
                    // Single
                    g.setColor( background );
                    g.fillRoundRect( 0, 0, getWidth(), getHeight(), CORNER_RADIUS, CORNER_RADIUS );
                    g.setColor( COLOR_BORDER );
                    g.drawRoundRect( 0, 0, getWidth(), getHeight(), CORNER_RADIUS, CORNER_RADIUS );
                }
            } finally {
                g.setColor( oldColour );
            }
        }
    
        protected void drawFocus( Graphics g, boolean on )
        {
            if( _drawPosition < 0 ) {
                super.drawFocus( g, on );
            } else {
                boolean oldDrawStyleFocus = g.isDrawingStyleSet( Graphics.DRAWSTYLE_FOCUS );
                try {
                    if( on ) {
                        g.setDrawingStyle( Graphics.DRAWSTYLE_FOCUS, true );
                    }
                    paintBackground( g );
                    paint( g );
                } finally {
                    g.setDrawingStyle( Graphics.DRAWSTYLE_FOCUS, oldDrawStyleFocus );
                }
            }
        }
    
        protected boolean keyChar( char character, int status, int time )
        {
            if( character == Characters.ENTER ) {
                clickButton();
                return true;
            }
            return super.keyChar( character, status, time );
        }
    
        protected boolean navigationClick( int status, int time )
        {
            if (status != 0) clickButton();
            return true;
        }
    
        protected boolean trackwheelClick( int status, int time )
        {
            if (status != 0)
            clickButton();
            return true;
        }
    
        //#ifndef VER_4.1.0 | 4.0.0
            protected boolean invokeAction( int action )
            {
                switch( action ) {
                    case ACTION_INVOKE: {
                        clickButton();
                        return true;
                    }
                }
                return super.invokeAction( action );
            }
        //#endif        
    
        /**
         * A public way to click this button
         */
        public void clickButton()
        {
            fieldChangeNotify( 0 );
        }
    
    //#ifndef VER_4.6.1 | VER_4.6.0 | VER_4.5.0 | VER_4.2.1 | VER_4.2.0
        protected boolean touchEvent( TouchEvent message )
        {
            int x = message.getX( 1 );
            int y = message.getY( 1 );
            if( x < 0 || y < 0 || x > getExtent().width || y > getExtent().height ) {
                // Outside the field
                return false;
            }
            switch( message.getEvent() ) {
    
                case TouchEvent.UNCLICK:
                    clickButton();
                    return true;
            }
            return super.touchEvent( message );
        }
    //#endif 
    
        public void setDirty( boolean dirty ) {}
        public void setMuddy( boolean muddy ) {}
    
         private static class MyLabelField extends LabelField
            {
    
                public MyLabelField( String text, long style )
                {
                    super( text, style );
                }
    
                public void layout( int width, int height )
                {
                    super.layout( width, height );
                }   
    
                public void paint( Graphics g )
                {
                    super.paint( g );
                }
            }
         class Imagelistner implements FieldChangeListener {
                public void fieldChanged(Field field, int context) {
    
                }
    
                }
    

    Thank you...

    Hi all
    I solved this problem... Thank you for watching my problem...
    And I create the component 'Image + String + box' with search (like the single selection) If you need it please send mail...
    Kind regards
    NGO

  • list with separators as options

    Hello

    I really need help to draw a separator between list items and add the icon at the beginning.

    IM desperate please help

    Thank you

    According to your requirement.

    1. download the zip file of AdvancdUI at the bottom of the link and check out it.

    Advanced user interface of GITHUB components

    and take only ListStyleButtonField.java file and add to your application.

    and

    Consider this example code: SanpleScreen.java

    public class SampleScreen extends MainScreen implements FieldChangeListener
    {
        ListStyleButtonField listStyleButtonField[];
        Bitmap bitmap=Bitmap.getBitmapResource("icon.png");
        int size=0;
        public SampleScreen()
        {
            size=10;
            createGUI();
        }
    
        private void createGUI()
        {
            VerticalFieldManager vertical=new VerticalFieldManager(VERTICAL_SCROLL| VERTICAL_SCROLLBAR);
            listStyleButtonField=new ListStyleButtonField[size];
    
            for(int i=0;i
    

    When I run the present, I got like this:

    Try running this example;

    =====================================================================

    Do not hesitate to click LIKE button if the solution is permits.

  • The application's permissions

    Hello

    I created a first very basic screen of ListStyleButtonFields, they aren't going anywhere yet.

    Using plug-in in Eclipse.

    4.7.0 JRE.

    All signed.

    The application does not start when loaded on my 9780 (6.0), I have to go application management and the value of all permissions allow manually, and then only it starts. Also what method should I use to push a new screen when we if fields is selected?

    Thank you.

    Hello

    Here is a code example that shows how to push a new screen.  I hope this helps.

    package com.rim.samples.device.helloworlddemo;

    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.component.RichTextField;

    /**
    * This class extend the UiApplication class, providing a
    * graphical user interface.
    */
    SerializableAttribute public class HelloWorldDemo extends UiApplication
    {
    /**
    * Entry point for application
    @param args command-line arguments (not used)
    */
    Public Shared Sub main (String [] args)
    {
    Create a new instance of the application and make the currently
    who runs the thread of the application of the event dispatch thread.
    PAP HelloWorldDemo = new HelloWorldDemo();
    theApp.enterEventDispatcher ();
    }

    /**
    * Creates a new HelloWorldDemo object
    */
    public HelloWorldDemo()
    {
    Push a screen onto the stack in the user interface for rendering.
    pushScreen (new HelloWorldScreen());
    }
    }

    /**
    * A class that extends the class screen, which offers default standard
    * behavior for BlackBerry GUI applications.
    */
    final HelloWorldScreen class extends screen
    {
    /**
    * Creates a new HelloWorldScreen object
    */
    HelloWorldScreen()
    {
    Set the displayed title of the screen
    setTitle ("Hello World Demo");

    Add a text field read-only (RichTextField) on the screen. The
    RichTextField is active by default. Here, we provide a style
    parameter to make the non-active field.
    Add (new RichTextField ("Hello World!", Field.NON_FOCUSABLE));
    }

    /**
    * Displays a dialog box to the user with the text "Goodbye!" when the
    * the application is closed.
    *
    * @see net.rim.device.api.ui.Screen #close)
    */
    public void close()
    {
    Display a farewell message before closing the application
    Dialog.Alert ("Goodbye!");
    Super.Close ();
    }
    }

  • How to detect the movement of components in PaneView event?

    Hi, there! ~

    At first please let me explain what is my development environment, I am develping apps based on BlackBerry JRE 6.0.0 by Eclipse and I'm debugging my apps on Simulator (BlackBerry 9800, 6.0.0.706) and peripheral (BlackBerry 9900, 7.1.0.912)

    I'm starting a new application which is a multifunction, during the wake I want to use a new layout UI for me, I've already imported from the code named "PaneManagerDemo" example and I built a framework in my application, I initialized TitleView as HorizontalScrollableTitleView and add titles and content.

    I also used a UI component custom named "ListStyleButtonField" come from the official web site of blackberry, once all the ListStyleButtonField of accumulated height exceeds the height of the content field, which cause the ListStyleButtonField lost her concentration and I do not know the focus was left to the last content topic whose screen slipped to finally make the time.

    My question is is it possible to detect the components slide event, I'll focus on the ListStyleButtonField what is the top of the content if I can control this event, please help me to solve this problem, thank you! ~

    I already find the method to detect the movement of the pane in PaneViewManager event, by according to this thread How to handle events of TouchGesture

  • Custom user interface does not update

    I have to paste a code very long to explain my question, for I can not download the attachment to the forums.

    The ListStyleButtonField has been downloaded from the official website, it's very cool, I think so, but now I faced a problem with this custom user and the PaneViewManager interface.

    Can I use ListStyleButtonField.setText (String text) method to update the text of the list in normal application, but using PaneViewManager is not updated the text, unless you use the keyboard to move the focus to another field.

    In my code, it is a PaneViewManager, 3 parts, and ListStyleButtonSet 3 in Pane1, press 1 to change the text of lists by pressing 2 2 keyboard component and so on.

    For example, in part 1, I press the 1 key, the Pane1 lists need to be changed, but I move the focus on them and then they will be refreshed.

    too much code so shortly before the end of work...
    I would try to call invalid, or, if that fails, return all the elements of the listfield.

  • Detection of selection of model AdvancedUI

    Hello

    I changed the UIExampleListStyleButtonFieldScreen of the AdvancedUI code sample class.  I have problems performing actions based on the users choice.  I see that 'field' is equal to the appropriate label, but I can't seem to get the right URL or take other actions based on selection.  I am trying to create an if statement in public Sub fieldchanged to determine who has been selected.  Something to point me in the right direction would be much appreciated:

    SerializableAttribute public class UIExampleListStyleButtonFieldScreen extends UIExampleScreen implements FieldChangeListener
    {
    Private UIExampleScreen _explanation;

    public UIExampleListStyleButtonFieldScreen() {}

    Super (NO_VERTICAL_SCROLL |) USE_ALL_HEIGHT);

    setTitle ("TU Mobile");

    Accent circumflex bitmap = Bitmap.getBitmapResource ("chevron_right_black_15x22.png");

    ListStyleButtonField a = new ListStyleButtonField ('News', circumflex accent);
    one.setChangeListener (this);
    Add (a);

    Two ListStyleButtonField = new ListStyleButtonField ('Events', circumflex accent);
    two.setChangeListener (this);
    Add (two);

    Three ListStyleButtonField = new ListStyleButtonField ('Admissions', circumflex accent);
    three.setChangeListener (this);
    Add (three);

    Four ListStyleButtonField = new ListStyleButtonField ('Track and field', circumflex accent);
    four.setChangeListener (this);
    Add (four);

    Five ListStyleButtonField = new ListStyleButtonField ('Donner de TU', circumflex accent);
    five.setChangeListener (this);
    Add (5);

    ListStyleButtonField 6 = new ListStyleButtonField ('Répertoire', circumflex accent);
    six.setChangeListener (this);
    Add (or six);

    Seven ListStyleButtonField = new ListStyleButtonField ('Photos', circumflex accent);
    seven.setChangeListener (this);
    Add (seven);

    Eight ListStyleButtonField = new ListStyleButtonField ('Map of the Campus', circumflex accent);
    eight.setChangeListener (this);
    Add (eight);

    Nine ListStyleButtonField = new ListStyleButtonField ('Weather', circumflex accent);
    nine.setChangeListener (this);
    Add (new);

    Ten ListStyleButtonField = new ListStyleButtonField ('About', circumflex accent);
    ten.setChangeListener (this);
    Add (RTE);

    _explanation = new UIExampleScreen();
    _explanation. SetTitle ("selection");

    LabelField explanationLabel = new LabelField ("detail screen");
    explanationLabel.setPadding (5, 5, 5, 5);
    _explanation. Add (explanationLabel);

    }

    ' Public Sub fieldChanged (field field, int context)
    {

    If statement would go here?

    UiApplication.getUiApplication () .pushScreen (_explanation);
    Dialog.Alert ("FIELD:" + field);
    }

    }

    The usual practice, when you try to use the fieldChanged method as you do here, is to have the fields as "global" features to your entire class.

    So, rather than create, and not being able to reference them in your constructor, you define them in the class itself.

    Here's a quick example:

    SerializableAttribute public class UIExampleListStyleButtonFieldScreen extends UIExampleScreen implements FieldChangeListener
    {
    Private UIExampleScreen _explanation;

    Accent circumflex bitmap = Bitmap.getBitmapResource ("chevron_right_black_15x22.png");

    ListStyleButtonField a = new ListStyleButtonField ('News', circumflex accent);

    Two ListStyleButtonField = new ListStyleButtonField ('Events', circumflex accent);

    public UIExampleListStyleButtonFieldScreen() {}

    Super (NO_VERTICAL_SCROLL |) USE_ALL_HEIGHT);

    one.setChangeListener (this);
    Add (a);

    two.setChangeListener (this);
    Add (two);

    ...

    }

    ' Public Sub fieldChanged (field field, int context)
    {

    If (field == a) {}

    ...

    }
    UiApplication.getUiApplication () .pushScreen (_explanation);
    Dialog.Alert ("FIELD:" + field);
    }

    }

  • Problem with ListStyleButtonSet (I'm a noob)

    Hi guys, I'm a noob with this development (java + BB) and I use the Eclipse plugin.  I have this code for ListStyleButtonSet and it shows the following error:

    "ListStyleButtonField cannot be resolved to a type.

    I have all my imports and I do not know how to use this interface user... could you help me please?  Thanks in advance

    PS. - Here is the code I use to create new ListStyleButtonSet:

    Button ListStyleButtonSet = new ListStyleButtonSet();

    ListStyleButtonField aboutButton = new ListStyleButtonField ('About', buttonRight);
    ListStyleButtonField ownerButton = new ListStyleButtonField ('owner', buttonRight);
    ListStyleButtonField statusButton = new ListStyleButtonField ('status', buttonRight);

    By far the best way to use this code is to download the whooe value and then copy the code into your application.  Change the names of the packages used by the classes of RIM provided that you want to use to match your applicatoin and add the source to your project.

  • Adjustable table / list for OS 6

    Hello

    I work with Blackberry OS 6, and I would like to make a list containing both text and an icon. I want to run the table, so when one of the items is on the app will bring me to another screen.

    I looked into the directive 6.0 user interface, but I can't guess how do.

    "I read this theTableView use of.

    the class to create a rich interactive list with text and icons"but I can't find the way.

    Thank you

    Thank you very much!

    Finally, I decided to use ListStyleButtonField, as in this case

    https://bdsc.webapps.BlackBerry.com/Java/documentation/ww_java_uinavigation/Advanced_UI_components_a...

    that was a lot easier for me, and was enough to meet my needs! (A form that looks like a list, where the buttons can have two, photo and text.

    However, thanks to you both for your help!

  • Reload screen,

    Hello!

    I use a main screen and another screen (B), in the main screen to have a textfiled and a button, when the type of user to a value and click the button I get data from the server, create an xml file, the xml file I file storage in the SD card and display data on the screen (B).

    so everything works fine... now the problem its that I have on the screen (B) I have a textfield and button and sweat can I return a new search, so I use this code to reload the screen without making a new instance of the same screen

    UiApplication.getUiApplication().invokeAndWait(new Runnable()
                {
                  public void run() {
                      cargarTablas();
                  }
                }
                );
    

    and work! but the problem its that data previously shape disappear the screen, so that the new data appear down the old data...

    in the service

    cargarTablas()
    

    I read the XML and display the data using ListStyleButtonField... now how do I remove the ListStyleButtonField (several) that I put in the first call?

    Problem solved I add the fields to the Manager and remove from their...

Maybe you are looking for