How continuous Horizontal scrolling field Manager?

Dear all,

I want to make the HorizontalFieldManger to scroll continuously.

As I have 5 bitmaps in my hfm and when I scroll it and when I am on 5th bitmap, I want to scroll to the first bitmap image.

Is this possible?

Please help me, I'm in a tense situation.

Thank you & best regards

Nrupay Shah

You will have to resolve the issue by program - HorizontalFieldManager alone cannot help you here.

Here's an idea: say, you got 7 images to show while the user can see only 5 of them at the same time. Create 11 buttons and put them in the following in your HorizontalFieldManager order:

1' - 2 ' - 3 - 4 - 5-6-7-1-2-3'-4'.

Those marked with the single quote character have the same image buttons numbered in the same way without the quotation.

Each button "without quotes" is the main button of the two with the same number and should have its onFocus defined as follows:

protected void onFocus(int direction) {
  final int twobuttonstotheleft = ;
  UiApplication.getUiApplication().invokeLater(new Runnable() {
    public void run() {
      parentManager.setHorizontalScroll(twobuttonstotheleft);
    }
  });
}

Fields 'quotes' (who will receive the focus since the events of navigation but never hold long) will be even simpler:

protected void onFocus(int direction) {
  Field myMainCounterpart = ;
  myMainCounterpart.setFocus();
}

The calculations of twobuttonstotheleft and myMainCounterpart should be easy and depend on your specific situation.

This way your target button is always shown in the middle of the Manager, surrounded (at least visually) by buttons which could be expected.

Tags: BlackBerry Developers

Similar Questions

  • How do horizontal scrolling via mousewheel tilt work in FF 20.0.0.1?

    EDIT: I solved this problem on my end. It turns out that my mouse manufacturer had a "helper" program that has been screwing the horizontal tilt support. Stop smoking it solved the problem. To other people having the same problem, I recommend that you check the utility of using your mouse.

    -

    I give myself to understand that previous versions of Firefox support a horizontal scrolling when it is used with a scroll wheel mouse that supported messages of tilt. However, I was unable to make it work on Firefox 20.0.1. I tried to disable scrolling smoothly, hardware acceleration, restart in safe mode, but it doesn't seem to make a difference.

    (The troubleshooting information below represent the usual configuration of my browser, disable all extensions).

    However, other applications seem to handle mousewheel tilts very well; I tried it with applications as simple as Notepad on Windows and they scroll horizontally in response to the inclinations of mousewheel. I'm puzzled; delete Mozilla tilt support in future versions of Firefox?

    Great to hear that you got it working! Thank you to come back and post the resolution for other users who may have the same problem.

  • How to horizontally scroll a page section?

    Hello

    I try to have just one section middle of my scrolling horizontal page but VERY new to Muse, so a little hard.  I tried I look at videos but mainly is for whole page scroll on.

    3 widgets of accordion with a brief description of our products, so I just these 3 to achieve over the next 3 years...

    I then inserted a blank parchment but don't know how to get these 3 images on it to scroll all the, and then how to get to the arrow to click on it, no car?

    I hope that makes sense!

    Thank you very much

    You would need this default way using scroll the entire page, as a workaround you can do the same content for all containers of scrolling horizontally so that it should return as only part scrolls.

    Thank you

    Sanjit

  • How to set horizontal scrolling to horizontal field Manager when fields are added using a loop for?

    The following code snippet contains a horizontal field Manager to which are added five buttons.

    1. I can't the value of horizontal scrolling to horizontal management Manager because of who I am not able to access the keys 4 and 5.

    2. usually, we put horizontal scrolling in the following way:

    container = new HorizontalFieldManager(USE_ALL_WIDTH|HORIZONTAL_SCROLL|HORIZONTAL_SCROLLBAR);
    

    3. so I also tried setting of horizontal scrolling in the following way

       container = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL|Manager.HORIZONTAL_SCROLLBAR)
                {
    
                    protected void sublayout(int maxWidth, int maxHeight) {
    
                        Field field = null;
                        int x = 0;
                        int y = 0;
                        int maxFieldHeight = 0;
                        int maxFieldWidth = 0;
                        for (int i = 0; i < getFieldCount(); i++)
                        {
                            field = getField(i);
                            layoutChild(field, maxWidth, maxHeight);
                            setPositionChild(field, x/*width-field.getWidth()*/,y);
    
                            x+=field.getWidth();
    
                            maxFieldWidth = maxFieldWidth + field.getWidth();
                            System.out.println("field width"+field.getWidth());
                            System.out.println(" max field width"+maxFieldWidth);
    
                            if(i==0)
                            {
                                maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height
                            }
                        }
                        System.out.println("final max field width"+maxFieldWidth);
    
                        setExtent(maxFieldWidth, maxFieldHeight);
    
                    }
                };
    

    but it's not working.

    4 I found this property: (position) horizontalFieldManager.setHorizontalScroll; that contains the parameterioo where the post is supposed to be the new horizontal scroll position. I tried passing the coordinate x of horizontal field Manager, but it does not work. I should pass as a parameter position?

    HorizontalFieldManager container = new HorizontalFieldManager()
    {
        protected void sublayout(int maxWidth, int maxHeight)
        {
            Field field = null;
            int x = 0;
            int y = 0;
            int maxFieldHeight = 0;
            for (int i = 0; i < getFieldCount(); i++)
            {
                field = getField(i);
                layoutChild(field, maxWidth, maxHeight);
                setPositionChild(field, x,y);
                x+=field.getWidth();
                if(i==0)
                {
                    maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height
                }
            }
    
            setExtent(Display.getWidth(), maxFieldHeight);
    
        }
    };
    
    ButtonField button1 = new ButtonField("Button1");
    ButtonField button2 = new ButtonField("Button2");
    ButtonField button3 = new ButtonField("Button3");
    ButtonField button4 = new ButtonField("Button4");
    ButtonField button5 = new ButtonField("Button5");
    
    container.add(button1);
    container.add(button2);
    container.add(button3);
    container.add(button4);
    container.add(button5);
    
    add(container);
    

    Need your valuable comments and suggestions. Please help me.

    I think that there is a bug in the sublayout (your HorizontalFieldManager 0 mode.  Given that the code did what I think WHAT HFM will do anyway, I recommend that you try to do this with a standard HFM, using this style:

    Manager.HORIZONTAL_SCROLL | Manager.HORIZONTAL_SCROLLBAR

    Let us know how you go.

    When I have more time I'll explain the bug, but if you want to investigate something, be aware that the maximum size that you can use in setExtent are the values that are passed to sublayout.  Compare the width as you try to define in setExtent whose width is increased.

  • How to change the background color of the horizontal field Manager

    How can we tell the background color of the horizontal field Manager (hfm) hanger

    If we should extend and override in ppaint, I tried

    I got color of hfm in tag I added to this

    all give me idea

    Try this:

            HorizontalFieldManager manager = new HorizontalFieldManager()
            {
                public void paint(Graphics graphics)
                {
                    graphics.setBackgroundColor(0x000000FF);//blue
                    graphics.clear();
                    super.paint(graphics);
                }
            };
    

    Concerning

    Bika

  • UI - Custom Paint in Horizontal Field Manager after completing the setting scrolling

    Hello

    I am able to do horizontal page scrolling when you add fields in horizontalFieldManger.

    But now I want to do a custom in horizontalFieldManager, paint using the page horizontal scrolling top given adjustment.

    Thank you

    It seems that you want to have background - repeat some almost text in your example. Then move it out of the subpaint and by the paintBackground-, you will not have to invoke any Super... here.

    Now when you say that a horizontal scrolling does not work, what exactly do you see? What do you see? Do you have enough focusable fields in your handler for scroll? Have HORIZONTAL_SCROLL style bit set?

  • Horizontal scrolling text change number field on the 6.0 devices

    Greetings,

    I'm trying to create a horizontal scrolling editable text field.  The general approach is to add an EditField to a HorizontalFieldManager who has the style bit HORIZONTAL_SCROLL.  It works very well on all devices up to 5.0.  However, I'm a problem on 6.0 devices.

    When the user tries to scroll right well that focused on this field, the text moves to the left and turns off visible region of the horizontal field manager.  This can also be reproduced when you tap the (torch device) and continue dragging to the left until it will disappear from the screen.

    Now, I understand that this happens because the edit field itself has a width of ~ infinite because its container Manager has scrolling enabled, but is not an acceptable user experience.

    I tried to limit the width for the edit field to the width of the text, but which caused exception argument not in conformity.  I tried a RichTextField with style hack USE_TEXT_WIDTH bit by directing the keyDown to setText field entries but have other problems.

    My remaining solution is to restrict the limit of characters for the width of the Manager, the text on the new line that I saw almost all others apply or write my own implementation of scroll.  The only exception is the address bar of the BlackBerry native browser application that seems to be a custom implementation.

    Reference:

    http://supportforums.BlackBerry.com/T5/Java-development/sample-code-scrollable-one-line-text-input-f...

    Any thoughts would be appreciated,

    Thank you.

    Thank you, setScrollingInertial (false) was actually what I was looking for.

    I was not able to implement your approach correctly but I was able to complete another work autour, I had before with the help of setScrollingInertial (false).

    Instead, I used a scrolling listener to limit scrolling based on the length of the text (new scrolling when limits are reached).  Without setScrollingInertial (false), the scrollChanged reminder would have been called multiple times all by animating the inertia.

    Unfortunately, I won't be able to apply this hotfix, because my generation must take over the 4.7 and setScrollingInertial is 5.0 + (customer doesn't want additional constructions).  However, this will be useful for future projects.

  • BlackBerry smartphones the display of images in the field of horizontal scrolling in blackberr

    Hi I want to show images in the horizontal field Manager and scrolling from right to left. focused image to see the place.

    What you ask is not trivial and will require a bit of reading as well as essays and substantive errors.

    Start by reading from this base.

    http://supportforums. BlackBerry.com/t5/java-development/mainscreen-explained/ta-p/606644

    http://supportforums. BlackBerry.com/t5/java-development/create-a-custom-layout-manager- for-a-screen /...

    http://supportforums. BlackBerry.com/t5/java-development/how-to-extend-Manager/ta-p/446749

    Once you have been through this, so try a few options and ask questions.

    I'm not aware of a KB article or thread on this forum that corresponds exactly to your needs, but there are lots of similar questions, so search the Forum to find answers too.

    Good luck.

  • After Firefox 12, some form in our help desk application fields do not display correctly. They appear as fields of horizontal scroll instead.

    We use a system of assistance to work (remedy of the BMC IT Service Management). In version 12 Firefox, all fields are displayed correctly in the form. However, if I switch to a version higher than 12, some fields appear as fields of horizontal scrolling (without displaying the data in them). Therefore, I am forced to stay on version 12 for the work.

    Found that it is actually a problem with the BMC Remedy system in use (version 7.1). Here are the details if anyone is interested: https://communities.bmc.com/communities/message/256456

  • How to adjust a horizontal scrolling to move larger increments

    -HP Pavilion dv7-6b55dx - Windows 7-64 bit

    How to adjust a horizontal scrolling to move larger increments

    Hello

    You can try the following to see if this will give you the option that I described earlier.

    First, download the latest installer driver Synaptics, on the link below and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp52001-52500/sp52352.exe

    Then, open windows control panel, open programs and features, right click on the entry "Synaptics Pointing Device Driver" and choose uninstall.

    Once done, restart the laptop.

    When windows has completely recharged, open your download folder, click with the right button on the setup of Synaptics and select "Run as Administrator" to launch the installation.  Once done, reboot the laptop again and see if the option is now available.

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    If the driver I suggest fails to install, use Recovery Manager to reinstall your original Synaptics driver - how to use the Recovery Manager to reinstall the drivers and software is detailed in the document at the link below.

    Recovery Manager - Windows 7

    Once the relocation complete, restart the laptop.

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    Kind regards

    DP - K

  • Problem Manager of horizontal scrolling for OS 6.0 and more?

    Hi all. I have a problem with the Manager of Horizontal scrolling. Every thing worked for OS 5.0 and below, the question arises for OS 6.0 and more. For example, check the following:

    I have 2 HFM added to the optimization of resources.

    HFM1 - contains 2 buttons.

    HFM2 - contains 6 buttons, and the user can scroll between the buttons.

    The questions is when user keep hitting the right key, when the focus is on the second button of HFM1, then the content of HFM2 scrolls to the right - what is bad behavior.

    Check the screenshot for Simulator 9810 (when scrolling to the right inside the HFM which contains the test1, test2 scrolls the second HFM):

    Scrolling in a managing scrools in another, why this happen and how that might be solved?

    Thank you in advance.

    Finally, I found a solution using ScrollChangeListener (SCL).

    So what I did I set the SCL for HFM2, then:

     public void scrollChanged(final Manager manager, int newHorizontalScroll,
                int newVerticalScroll)
        {
    
            //----> fixing the issue when one HFM scroll another one for OS 6.0 and above
            int fwf = manager.getFieldWithFocusIndex();
            if (fwf == -1)
                manager.setHorizontalScroll(0);
            //<---- fixing the issue when one HFM scroll another one for OS 6.0 and above
    
    }
    

    Thanks to all in any case.

  • Assign a spacing equal to the fields in the horizontal field Manager

    Hello

    I add a number of vertical field managers to a horizontal field Manager. Each manager of vertical field has a text with an image under. The text varies in width images in each vertical field Manager seem to have a different amount of space between them. Is there a way to remedy this situation? Joined a raw image in the way that message on the screen. How can I get the same amount of space between each area of the rectangle?

    Thank you

    Here's some code that I received from one of the sessions at the last DevCon.  Should be useful.  Might help explain customer managers too.

    /*
     * EqualSpaceToolbar.java
     *
     * Research In Motion Limited proprietary and confidential
     * Copyright Research In Motion Limited, 2009-2009
     */
    
    import net.rim.device.api.ui.*;
    
    public class EqualSpaceToolbar extends Manager {
    
        private static final int SYSTEM_STYLE_SHIFT = 32;
    
        public EqualSpaceToolbar() {
            this( 0 );
        }
    
        public EqualSpaceToolbar( long style ) {
            super( USE_ALL_WIDTH | style );
        }
    
        protected void sublayout( int width, int height ) {
            int numFields = getFieldCount();
            int maxHeight = 0;
    
            // There may be a few remaining pixels after dividing up the space
            // we must split up the space between the first and last buttons
            int fieldWidth = width / numFields;
            int firstFieldExtra = 0;
            int lastFieldExtra = 0;
    
            int unUsedWidth = width - fieldWidth * numFields;
            if( unUsedWidth > 0 ) {
                firstFieldExtra = unUsedWidth / 2;
                lastFieldExtra = unUsedWidth - firstFieldExtra;
            }
    
            int prevRightMargin = 0;
    
            // Layout the child fields, and calculate the max height
            for( int i = 0; i < numFields; i++ ) {
    
                int nextLeftMargin = 0;
                if( i < numFields - 1 ) {
                    Field nextField = getField( i );
                    nextLeftMargin = nextField.getMarginLeft();
                }
    
                Field currentField = getField( i );
                int leftMargin = i == 0 ? currentField.getMarginLeft() : Math.max( prevRightMargin, currentField.getMarginLeft() ) / 2;
                int rightMargin = i < numFields - 1 ? Math.max( nextLeftMargin, currentField.getMarginRight() ) / 2 : currentField.getMarginRight();
                int currentVerticalMargins = currentField.getMarginTop() + currentField.getMarginBottom();
                int currentHorizontalMargins = leftMargin + rightMargin;
    
                int widthForButton = fieldWidth;
                if( i == 0 ) {
                    widthForButton = fieldWidth + firstFieldExtra;
                } else if( i == numFields -1 ) {
                    widthForButton = fieldWidth + lastFieldExtra;
                }
                layoutChild( currentField, widthForButton - currentHorizontalMargins, height - currentVerticalMargins );
                maxHeight = Math.max( maxHeight, currentField.getHeight() + currentVerticalMargins );
    
                prevRightMargin = rightMargin;
                nextLeftMargin = 0;
            }
    
            // Now position the fields, respecting the Vertical style bits
            int usedWidth = 0;
            int y;
            prevRightMargin = 0;
            for( int i = 0; i < numFields; i++ ) {
    
                Field currentField = getField( i );
                int marginTop = currentField.getMarginTop();
                int marginBottom = currentField.getMarginBottom();
                int marginLeft = Math.max( currentField.getMarginLeft(), prevRightMargin );
                int marginRight = currentField.getMarginRight();
    
                switch( (int)( ( currentField.getStyle() & FIELD_VALIGN_MASK ) >> SYSTEM_STYLE_SHIFT ) ) {
                    case (int)( FIELD_BOTTOM >> SYSTEM_STYLE_SHIFT ):
                        y = maxHeight - currentField.getHeight() - currentField.getMarginBottom();
                        break;
                    case (int)( FIELD_VCENTER >> SYSTEM_STYLE_SHIFT ):
                        y = marginTop + ( maxHeight - marginTop - currentField.getHeight() - marginBottom ) >> 1;
                        break;
                    default:
                        y = marginTop;
                }
                setPositionChild( currentField, usedWidth + marginLeft, y );
                usedWidth += currentField.getWidth() + marginLeft;
                prevRightMargin = marginRight;
            }
            setExtent( width, maxHeight );
        }
    
    }
    
  • Need help with this Vertical field Manager? It scrolls to the low n!

    I created a vertical field Manager

    public class BGManager extends VerticalFieldManager{
        public BGManager() {
            super(VerticalFieldManager.USE_ALL_WIDTH|USE_ALL_HEIGHT);
        }
        public void paint(Graphics graphics)
        {
            graphics.setBackgroundColor(Color.BLACK);
            graphics.clear();
            super.paint(graphics);
        }
    
    }
    

    I added to my screen, then I added fields in addition to this.

    It works fine, but the Manager starts to scroll down when the focus is on the last field and I'm trying to scroll down.

    He does not stop to the last topic.

    How can I fix?

    Take a look at this thread. It addresses exactly your problem with solution:

    http://supportforums.BlackBerry.com/T5/Java-development/VerticalFieldManager-with-fixed-size-scroll-...

  • ThinkPad Compact Bluetooth keyboard: how to enable horizontal scrolling?

    Hi all

    any advice on "how to enable horizontal scrolling" on my Bluetooth keyboard external ThinkPad?

    It is available with my current ThinkPad 450 and was with my a previous T420.

    I bought the keyboard because it has the same layout and the trackpoint, but I had no idea that the behavior would be different.

    Thank you very much for your help.

    Goodbye Kenny

    Hello

    I just noticed on the driver it seems that horizontal scrolling has been fixed.

    1.5.1.0 2016-03-11
    Fixed, HScroll.

    Here is the driver for download.

    Concerning

  • How do disable you dynamic horizontal scrolling "feature"?

    How do disable you dynamic horizontal scrolling "feature"?
    its totally _ me off. Im trying to use a new program of photo manipulation, but can't zoom in and because it scrolls the work area, I need trouble! Ugh! I swear to God _... it's just ridiculous!
    Please someone tell me how to disable this "feature".

    musgoodw, the best advice I can do is just play with the settings of '' mouse. ''  Just type mouse into the start menu.
    By default, a Synaptics touchpad has a vertical scroll box to the right of the touchpad. Some versions of pilot also (default) enable the horizontal scroll down box.
    Both can be changed to enabled, amount of space used, where they are, speed of scrolling and much more in the config of Synaptics.  You would be pleasantly surprised how you can set one up.  ;)

    HTH,
    Chris [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

Maybe you are looking for

  • Password bios clear (Compaq CQ-57)

    After three trials he give a stop code 60330400 is the master reset code for this code? Please and thank you... kt

  • Surface barcode reader

    I looked if and how the Surface can read bar codes using the camera on the device itself. If someone could link me to any of the information that would be wonderful. I saw a few other devices to plug into the surface, but I'm more interested in using

  • constant blinking even interferes with keyboard

    For some reason any my computer flashes constantly, never end a program, but it kind of stuttering.  Typing on the keyboard is a real issue... letters jumping with every breath heart glitter

  • Cisco ise HA requeriments on hardware or software

    Hi my name ia Ivan I would like to know if possible to make a table in HA primary and replica uses two different Cisco ISE, in software y hardware example: virtual device in HA with ISe ise or two ISE with different reference numbers. y at - it all r

  • Why new lines appear when you use the eraser

    Help!I seem to be the only one with this problem, I tried Googling and my tutorial mentioned none of this...When I try to delete a path, new circular paths are created instead! Please see the attachment.Also, how do I increase/decrease the size of gu