Manager.moveFocus (int, int, int) on BlackBerry OS 7.1

Hi guys,.

Just found out that

protected int moveFocus (amount int, int status, int time)

is not called.

My movement in the development of custom Manager is broken.

Thank you!

Hi Simon!

Thanks a lot for the participation in the discussion. Question created and found workaround:

protected int nextFocus(int amount, int axis) {
if (amount > 0 && axis == Field.AXIS_VERTICAL)
return -1;
else
return super.nextFocus(amount, axis);
}

But it's not compilale for<>

For some reason navigationMovement substituent does not help. I returned false with dy > 0 but I see that the focus is shifted in some internal (hidden/private, see Debugging) method moveFocusWithScroll (something like that).

The key to 7.x. There are a lot of devices without touch screens yet (as the curve).

Tags: BlackBerry Developers

Similar Questions

  • Hide the Application in the management of the applications in the Blackberry

    I want to hide my Application in the management of Blackberry applications.

    Is this possible?

    How can I achieve this?

    I guess you mean that when the user goes to the Option of Application Management on the device, he or she will not see your app in the list?

    If so, then the answer is it is not possible to hide your app in the list.

  • Manager software bad sync Smartphone to blackBerry for mac

    I installed the software for mac Pocket mac and it can't even connect to my blackberry via USB.

    Is there something that RIM does not tell us mac users on how to make it work?

    Its September already and the website says the program office for Mac is ready in September. When? Its not available yet!

    A bad sign that mac users get when installing software is when it requires running an account of Directors as the software was not properly designed to run on Mac. Only windows users who know no better, run in the accounts of the administration. Mac users are much too smart for this absurdity. Since when any program should seek enforcement of an administrative account dangerous to make it work? Maybe better rim would hire an expert talent of apple to do the job?

    The other sign of the evil software written is when he tries to install the two programs at the same time and the computer freezes for 10 minutes before it sorts things.

    I did install blackberry media sync and it has no problems connecting to my blackberry or copy itunes media to him. So why software Pocket mac cannot work? He repeats to me that synchronization expires when it is connected to my mac. It is certainly not expire with media software is so the only thing that might be bad is the program itself being badly written. I'd hate to see how the desktop software gets the same treatment in October (not yet available in September) when it comes out.

    So, how can I sync my calendar, mail and other things? And what exactly is the express pocket on my blackberry that is supposed to be? No information available on the blackberry to tell anyone what it is. In addition, it also times out when I click on it to get installed it. In addition to the crapware legalize, how about some more info in the file as to what the program is and why anyone would need to install it?

    I can not here looking to get to relevant results either. Maybe I type in the correct secret code if anyone knows what they are?

    For Blackberry Desktop Manager is almost officially released. It works very well. I can tell because I have a beta version of leakage. Its sweet! If you can't wait im sure a quick search, you have the beta version of leakage...

    But I'm sure that its on track for September.  And why you ago on relaese date? It says September. No September! St.   It comes out in September. Gripe about this whenit October...

    Good luck anyway, enjoy your Storm and Mac together!

     

    Well, I'm griping on this subject since its October 1 and it will not be released until tomorrow... wah wah wah. I was right! You were wrong! I don't want a cause of beta flight, I don't have to go to the bathroom right now.

  • BlackBerry Smartphones Media Manager View / transfer of images from the Blackberry

    Recently, two Workstations have had their media manager stop working. When the blackberry is connected to the computer and looked in the Media Manager, images on the blackberry developed as gray with a tiny band of pixels in the image at the top. When the images are transferred to the PC they hold it. When images are sent from the blackberry to the PC images find very well.

    We have reinstalled nothing doesn't.

    Workstations are 2 XP with all service packs except SP 3. Desktop BlackBerry 4.3

    I installed 4.5 just above the previous version and seem to have the issue resovled. The interface is substantially different.

  • Smartphones blackBerry desperately need help: Desktop Manager, Media Sync

    Hi guys,.

    I am desperate for help. I have read through the Help menu and was functional on all night without success.

    Last night I installed the Desktop Manager from the CD that came with my 8310 and I also downloaded and installed the Media Sync application on the Blackberry website. Subsequently, I decided to download OS 4.5 since my curve runs only 4.2.

    I connected my Blackberry via USB and noticed that as soon as I do this, I can click is no longer on the Desktop Manager. I looked in the Office Manager in my system tray and confirmed that it "was still working", as well as in my task manager which revealed that he was still in the market.

    Possibly by a moat, I managed to get the Application Manager to work and tried to install OS 4.5. I heard that it takes a while, so I left it all night with my computer expecting to come back in the morning. When I go back to him, it was still in the phase of 'back-up device', but no progress in the progress bar. Looking at my curve revealed my usual home screen. As my button cancel in the request was not clickable, I had to unplug and put an end to the program using the Task Manager.

    I restarted the computer and I tried to start the Desktop Manager and plug in the unit. The Director of office prompted me for my password, I entered, and he said that it was a link on the blackberry and the Desktop Manager. I tried to click on the different options (Application Manager, Media Manager, etc.) but found that they were not clickable. Nothing happens when I click on them. I tried to look at the connection in the Options, but found that I can't click on that.

    I decided to try the next Media Sync. I opened Media Sync and put my password. After that I put my password, it says that it cannot connect to the device, please try again. I click Retry, nothing.

    I will go back to the Desktop Manager, unplug the blackberry, click Application Manager (as it is the only way I can make it work) and plug the blackberry again after that the Application Manager has started to work. I try to start the installation of the OS 4.5.

    He starts it connects to device stage, then stops and says that he "cannot connect to the device. You will need to enter a password on the device. ». No password box appears, and the screen of my blackberry only said that it is connected to the computer.

    I've included some shots of what's going on.

    Media sync

    Application Manager

    Director of office

    BlackBerry

    Please note that the Blackberry is the display that it is connected to the computer, but the Desktop Manager now says it is not.

    Questions

    For the screencapture above, please note how the Desktop Manager now says that the device is connected, but the same result can be shown with the Media Sync.

    The problem is now resolved, but I do not know why.

    Two days ago, I installed and then decided to uninstall Facebook. I downloaded the latest version of the Desktop Manager, once again, and when I plugged in my phone, it worked. I have tried since then with the same results.

    I'm really happy about it! But I still don't know what happened, or if the installation of Facebook had nothing to do with it.

  • Smartphones blackBerry Desktop Manager 4.6 and 4.7 email reconcile with outlook 2003 problem

    Hello

    I am very new to the family "BlackBerry" but experiencing problems with the Desktop Manager software. I have a Blackberry "BOLD", use Desktop Manager 4.7 v (latest version) and Outlook 2003. I can set up and synchronize with Outlook calendar, tasks, Memo, and contacts very well, but the 'box' above is to "Reconcile the emails" is grayed out and I cannot select.

    Surely this is a basic function - that is to reconcile my Outlook Inbox with my Inbox BlackBerry "BOLD" combined? No idea why it doesn't work for me - it is a setting of Outlook or a Desktop Manager problem? Very frustrating! Any help gratefully received.

    Thank you

    Chris

    Believe me, you can not, you need BES to synchronize emails.

  • How to change the width of editfield in blackberry java

    Hi, blackberry has,

    I want to change the width of editfield... can someone tell me how I can do

    Hi Ludovic,.

    use TableLayoutManager and adjust the width of the field (based on no. added columns) for your screen.

    I don't get your condition, but if you want to insert fields so that it will adjust the space then use RoundedPanel and you can add a tablelayoutmanager to this Panel.

    /*
     * RoundedPanel.java
     *
     * © , 2003-2008
     * Confidential and proprietary.
     */
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.system.Display;
    
    /**
     *
     */
    public class RoundedPanel extends VerticalFieldManager {
        private int _heightBtmIncr = 0;
        private int color = Color.WHITE;
        private String str = null;
    
        public RoundedPanel() {
            super(Manager.VERTICAL_SCROLL);
        }
    
        public RoundedPanel(int heightBtmIncr) {
            super(Manager.VERTICAL_SCROLL);
            _heightBtmIncr = heightBtmIncr;
        }
    
        public RoundedPanel(int color , String str) {
    
            super(Manager.VERTICAL_SCROLL);
            this.str = str;
            this.color = color;
        }
    
        public void paint(Graphics g) {
            g.setBackgroundColor(Color.LIGHTGREY);
            int initialColor = g.getColor();
            g.setColor(Color.LIGHTGREY);
            g.fillRect(0, 0, this.getPreferredWidth(), this.getHeight());
            g.setColor(color);
            g.fillRoundRect(3, 3, this.getPreferredWidth() - 6, this.getHeight() - 6, 17, 17);
            g.setColor(Color.DARKGRAY);
            g.drawRoundRect(3, 3, this.getPreferredWidth() - 6, this.getHeight() - 6, 17, 17);
            g.setColor(initialColor);
            super.paint(g);
        }
    
        public void sublayout(int maxWidth, int maxHeight) {
            super.sublayout(maxWidth, Integer.MAX_VALUE);
            int fieldCount = getFieldCount();
            int x = 12;
            int y = 10;
            Field child = null;
    
            for (int i = 0; i < fieldCount; i++) {
                child = this.getField(i);
                setPositionChild(child, x, y);
                layoutChild(child, getFieldWidth(child), Integer.MAX_VALUE);
                int childHeight = getFieldHeight(child);
                y = y + childHeight;
            }
    
            this.setExtent(getPreferredWidth(), Math.max(y, getPreferredHeight()));
            setVirtualExtent(getPreferredWidth(), Math.max(y, getPreferredHeight()));
        }                  
    
        private int getFieldWidth(Field f) {
            return Math.min(Math.max(Math.max(f.getContentWidth(), f.getWidth()), f.getPreferredWidth()), this.getPreferredWidth() - 12);
        }
    
        private int getFieldHeight(Field f) {
            return Math.max(Math.max(f.getContentHeight(), f.getHeight()), f.getPreferredHeight());
        }
    
        public int getPreferredWidth() {
            return Display.getWidth();
        }
    
        public int getPreferredHeight() {
            int height = 6;
            int iNumFields = getFieldCount();
            for (int i = 0; i < iNumFields; i++) {
                height += getFieldHeight(getField(i));
            }
    
            return height + _heightBtmIncr + 6;
        }
    
        protected boolean keyDown( int keycode, int status ) {
            invalidate();
    
            return super.keyDown( keycode, status );
        }
    
        protected boolean navigationMovement( int dx, int dy, int status, int time ) {
            invalidate();
    
            return super.navigationMovement( dx, dy, status, time );
        }
    
        protected int moveFocus(int amount, int status, int time) {
            invalidate();
    
            return super.moveFocus(amount, status, time);
        }
    }
    

    Thank you & best regards

    pp

  • Prevent development leave Manager then moving left/right

    I have a screen with a manager at the top, lower-left editfield and a button at the bottom right. I am trying to find a way to make sure if the user tries to move their development (with wheel) left/right, it moves back and fourth between these two fields. If the user moves to the top (in other fields), it will go directly to the Manager at the top, and if they move down it will stay on all the areas that they were on.

    I could get this to work with navigationMovement, but then the editfield would no longer work.

    Anyone have any ideas?

    After looking around the docs a bit more, I've finally came up with this solution. It is a bit hardcoded for my specific case, but should help others who have similar problems.

    protected int moveFocus(int amount, int status, int time) {
        int original = getFieldWithFocusIndex();
        int result = super.moveFocus(amount, status, time);
        boolean fieldChanged = (original != getFieldWithFocusIndex());
    
        // Move focus vertically
        if ((status & Field.STATUS_MOVE_FOCUS_VERTICALLY) == Field.STATUS_MOVE_FOCUS_VERTICALLY) {
            if (amount > 0) { // Move Down
                 // Just stay at the original field
                if (fieldChanged) getField(original).setFocus();
            } else { // Move Up
                // If the field changed leave manager
                if (fieldChanged) {
                    return -1;
                }
    
                // If the field didn't change return the result
                return result;
            }
        }
    
        // Don't leave the manager
        return 0;
    }
    
  • Manager custom, throw IndexOutOfBoundsException when call deleteAll()

    import java.util.Vector;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Characters;
    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.Ui;
    Import net.rim.device.api.ui.UiApplication;

    SerializableAttribute public class LrcManager extends Manager {}
    private int _width, _height;
    _background private bitmap;
    private int currentIndex;
        
    protected LrcManager (int width, int height, Bitmap background, long style) {}
    Super (style);
    _width = width;
    _height = height;
    _background = background noise;
    }

    private int startIndex, endIndex;
        
    protected void sublayout (int maxWidth, maxHeight int) {}
    If (this.size () > 0) {}
    int currentItemY = _height/2 + this.getField (currentIndex) .getPreferredHeight () / 2;
                
    for (int i = currentIndex; I > - 1; i--) {}
    ((LrcItem) getField (i)) .setColor (Color.LIGHTGRAY);
                    
    currentItemY = this.getField (i) .getPreferredHeight ();
    this.setPositionChild (this.getField (i), (_width - this.getField (i) .getPreferredWidth ()) / 2, currentItemY);
    layoutChild (this.getField (i), _width, _height);
    If (currentItemY<>
    startIndex = i;
    break;
    }
    }
        
    currentItemY = _height/2 + this.getField (currentIndex) .getPreferredHeight () / 2;
                
    for (int i = currentIndex + 1; I
    ((LrcItem) getField (i)) .setColor (Color.LIGHTGRAY);
                    
    this.setPositionChild (this.getField (i), (_width - this.getField (i) .getPreferredWidth ()) / 2, currentItemY);
    currentItemY += this.getField (i) .getPreferredHeight ();
    layoutChild (this.getField (i), _width, _height);
    If (currentItemY > _height) {}
    endIndex = i;
    break;
    }
    }
                
    ((LrcItem) getField (currentIndex)) .setColor (Color.WHITE);
    }
    setExtent (_width, _height);
    }
        
    protected void subpaint (Graphics g) {}
    If (this.size () > 0) {}
    for (int i = startIndex; I
    this.paintChild (g, this.getField (i));
    }
    }
    }
        
    protected void paintBackground (Graphics graphics) {}
    If (_background! = null)
    graphics.drawBitmap (0, 0, _width, _height, _background, 0, 0);
    }

    public void ForwardToPos(int second) {}
    If (((LrcItem) getField (currentIndex + 1)) .second)<>
    currentIndex ++;
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    layout (_width, _height);
    updateLayout();
    Invalidate();
    }
    });
    }
    }
        
    public void setPos(int second) {}
    for (int i = 0; i)
    If (((LrcItem) (i) getField) .second > = second) {}
    currentIndex = i;
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    layout (_width, _height);
    updateLayout();
    Invalidate();
    }
    });
    return;
    }
    }
    currentIndex = size () - 1;
    }

    public void add (field) {}
    throw new UnsupportedOperationException();
    }
    {} public void addAll (fields [])
    throw new UnsupportedOperationException();
    }
    public final void insert (field) {}
    throw new UnsupportedOperationException();
    }
    public final void insert (field field, int index) {}
    throw new UnsupportedOperationException();
    }
    {} public void delete (field)
    try {}
    Super.Delete (Field);
    } catch (Exception ex) {}
    System.out.println (ex. ToString());
    }
    }
        
    public void deleteAll() {}
    try {}
    for (int i = (size) - 1; i > - 1; i--) {}
    Delete (getField (i));
    }
    } catch (Exception ex) {}
    System.out.println (ex. ToString());
    }
    }
        
    public void add (int second, String text) {}
    Super.Add (new LrcItem (second, text, getFont () .derive (0, 20, Ui.UNITS_px), Color.WHITE, 480, 0));
    }

    public final void insert (int second, String text, int index) {}
    Super.Insert (new LrcItem (second, text, getFont () .derive (0, 20, Ui.UNITS_px), Color.WHITE, 480, 0), index);
    }
        
    public int size() {}
    Return this.getFieldCount ();
    }

    }

    I had a very quick glance, I probably missed or to some things so ignore my comments, if you don't think they are correct.

    A few ' style questions:

    (1) why you substituting delete and deleteAll and using size() instead of getFieldCount().

    (2) for me, the performance benefits to count backwards in loops is over-priced - and the confusion it can cause in the coding is often overlooked.

    (3) you sublayout loop backwards and the loop count seem to do essentially the same thing, is there a reason they are separate?

    (4) I don't know that you have understood the concept of a virtual height and the height of the screen for a manager of scrolling.  Your sublayout seems to try to limit the number of fields displayed in the size of the actual scope and assume that this will continue after your currentIndex.  Take a look at this:

    http://supportforums.BlackBerry.com/T5/Java-development/implementing-a-standard-style-scrollbar-on-a...

    That said, it seems to be a problem with your maintenance of currentIndex when you remove fields. Whenever you remove the field, it will cause a sublayout, and once currentIndex is > that the number of fields on the left, your treatment will die with an output of exception of limits.  But in sublayout, not delete.

    Perhaps you could explain what you're actually trying to do with this Manager as it is is not clear to me from the code.

  • How to prevent the development of leaving the Manager by trackball?

    I have a custom Manager (Manager of the child) with ListField, BasicEditField... This Manager is one child of the other manager of Parent. I want to keep the focus in the first Manager when scroll by TRACKBALL... (focus only move child fields of the first Manager, do not go to other children of the Parent responsible for fields) and I still can I set focus manually to other children the responsible Parent fields. Help me! Thank you very much!

    Rajat_10Sep thanks for your reply! Your solution is working. But when I scroll very fast trackball. Focus has again let my child manager (and your managerBag). You can try again. I solved my problem of substitution MoveFocus(). This is my code:

    protected int moveFocus(int amount, int status, int time)
                {
                    int focusIndex = this.getFieldWithFocusIndex();
                    int ret;
                    if (amount < 0 && (focusIndex + amount) < 0)
                    {
                        ret = super.moveFocus(0, status, time);
                    }
                    else
                    if ( amount > 0 && (focusIndex + amount) >= getFieldCount())
                    {
                        ret = super.moveFocus(0, status, time);
                        (getField(0)).setFocus();
                    }
                    else
                        ret = super.moveFocus(amount, status, time);
    
                    return ret;
                }
    
  • BlackBerry smartphones can not sync - device blocks when connect to usb

    Help!  Cannot connect my curve on my desk.  When I connect with usb, the device stops and does not connect to Desktop Manager.  Support of Sprint and blackberry are no help and tell me it's the computer.  I have followed all directions on the support site bloackberry for a clean uninstall of Office Automation, including deleting registry keys, make sure that windows is up-to-date, etc. - still not connect.  Have xp pro on this desk.  Other devices like cameras connect seamlessly via USB.  The Device Manager shows all the ports are enabled and work correctly.  Help, please.

    response to the original poster (months later):

    Finally my computer guy and I thought about it. There were two conflicts on my PC at the origin of the problem.

    First of all my photo editing software NEGLIGIBLE adoble a dot nox file nokiamanager which is in contradiction with the blackberry desktop software.

    Then the int reminders right start menu for my back up utlities for external hard drive is also in contradiction with blackberry desktop software.

  • How can I get my blackberry 8310 on my computer?

    I had it once but now I can't connect it to my computer to get my photos from my phone to Paolo someone please help

    You must install the Blackberry Desktop Manager software.

    http://CA.BlackBerry.com/software/desktop.html

    I hope this helps.

  • DCOM98 UPDATE AND RESTART THE OFFICE MANAGER

    PLEASE INSTALL DCOM98 UPDATE, RESTART THE DESKTOP MANAGER

    You have disconnected your Blackberry to your computer, then install the DCOM98 update and restarted your computer yet?

  • The use and the importance of pushing blackBerry SDK

    Hello

    As far as the Service of Blackberry Push has been revealed, I studied the documentation about this feature and fell on several issues:

    1 BB Push SDK. Is it correct to say that the main purpose of this framework is to help you efficiently create game server side of your app to push. There are certain requirements to the development environment as described in the docs (container servlet, RDBMS, java). But what happens if I run a .net Server, for example? Or other than those of java technology. Does that mean that I could not be able to use the SDK?

    2 the party push SDK is required to write the push application? Or I can write and manage https post request from PPG (BlackBerry Infrastructure) on mine?

    Could someone tell me please those moments!

    Thanks in advance.

    Of Push BlackBerry SDK is provided as a way to help a developer to create the game apply to push server-side.  If you use the SDK to push, the application server-side will have to be created in Java.

    However, you can create the server of a request to push in any language you like if you're using another IDE side.

  • BlackBerry Z10 transfer data/files/contacts

    Hello

    So I have a little problem. I just traded my 9900 to a Z10 to the store where I got them. I saved the 9900 this afternoon before I took it, but I didn't know that the Office Manager was not compatible with the new OS. Now my problem is that I can not transfer all of my contacts to the new phone-family, friends, work contacts are currently lost in limbo.

    Any suggestions on what we can do? Or will there be an update of the BB Desktop Manager to make it compatible with the new OS soon?

    Any help would be much appreciated.

    Thank you!

    You have to follow the instructions in the following article:

    KB33480 - smartphone BlackBerry 10 does not start and displays a phone with USB icon after a switch...

    Who should get you operational return!

    (Note: If you are unable to work, make sure that the BlackBerry Link software is completely stopped by pressing Ctrl + Alt + Delete on your computer, then go to process tab and Task Manager, stop all processes related to BlackBerry). Hello

    I understand that you do not have access to your old Bold 9900 more then? If you can, the first thing I would say is in contact with the store to see if they have not deleted your "BOLD" again. If so, you can use a media card in the old Bold 9900, and then use the device to device transfer tool. (Just out of curiosity, why did you leave the "BOLD" to the store? I hope that they geve you ok trade value to it)

    If there is no way to get more on the phone, then you will need something that can extract the data from your backup. I would like to try something like a program called MagicBerry, which is available here:

    http://menastep.com/pages/magicberry.php

    Unfortunately, you may be looking at having to manually return the info well. Alternatively, if you have an e-mail like Hotmail/Outlook, Gmail or Yahoo account, you should be able to transfer/manage wireless contacts, etc. So far, my Outlook.com account offered the best option with synchronization of contacts, calendar and tasks.

    A new version of the BlackBerry link is soon that will provide the ability to synchronize Outlook data and shortly after, two way sync, but if you need an immediate solution, the above is the best I can say for the moment.

Maybe you are looking for