Virtual keyboard hides part of the change to the field

Hello

I have a labelfield, field change and a button that are centered aligned vertically. The three fields, I added in a Verticalfield Manager which is then added to a horizontal region Manager. And finally the HFM is added to an another value for money. Now in the 9800 device or curve 9380, I noticed that when I touch the edit field, virtual keyboard is coming. And he hides the field partially change.

I want to move things to the top when the virtual keyboard appeared. How can I do. My code is here:

       HorizontalFieldManager hfm = new HorizontalFieldManager();
        VerticalFieldManager vfmComponent = new VerticalFieldManager(USE_ALL_WIDTH);
        vfmComponent.add(lfServerUrl);
        vfmComponent.add(mEfURL);
        vfmComponent.add(mBtnSave);
        hfm.add(vfmComponent);
        int topEmptySpace = (Display.getHeight() - (Bitmap.getBitmapResource(mStrTopBar).getHeight() + hfm.getPreferredHeight() + 25)) / 2;
        hfm.setMargin(topEmptySpace, 0, 0, 0);
        VerticalFieldManager vfmMain = new VerticalFieldManager(VERTICAL_SCROLL| NO_HORIZONTAL_SCROLL );
        vfmMain.add(hfm);
        add(vfmMain);

Help, please.

When you start to need as many managers to get the look you want, then you know that you should really create your own Manager.

These two should help you to do:

http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

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

For example, I hacked together a "centeringManager" and the screen, which should do what you want.  But please use this as a reference sample, understand what he does and maybe even improve it.

In production code, I would really remove the centeredManager and centering Manager across all fields and place them, but then you must code a manager which includes margins, which would confuse the point of this example - as a basic implementation of a Manager.

Hope it's what you want.

public final class CenteringScreen extends MainScreen {

    /**
     * verticallyCenteringManager takes one Field and positions it
     * centered in the space it has.
     */
    VerticalFieldManager centeringManager = new VerticalFieldManager() {
        protected void sublayout(int maxWidth, int maxHeight) {
            if ( this.getFieldCount() > 1 ) {
                throw new RuntimeException("Expecting only one Field or Manager to be added");
            }
            if ( this.getFieldCount() == 1 ) {
                Field f = this.getField(0);
                layoutChild(f, maxWidth, maxHeight);
                int requiredTopMargin = (maxHeight - f.getHeight())/2;
                int requiredLeftMargin = (maxWidth - f.getWidth())/2;
                setPositionChild(f, requiredLeftMargin, requiredTopMargin);
                setExtent(maxWidth, maxHeight);
            } else {
                setExtent(0, 0);
            }
        }
    };

    /**
     * Fields added to centeredManager will be displayed 'centered' vertically
     * regardless of orientation of screen and presence or absence
     * of virtual keyboard
     */
    VerticalFieldManager centeredManager = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);

    // Sample Fields to be added
    ButtonField sampleButton = new ButtonField("Button", ButtonField.FIELD_HCENTER);
    LabelField sampleLabel = new LabelField("Label", LabelField.FIELD_HCENTER);
    BasicEditField sampleBef = new BasicEditField("Text", "", 255, BasicEditField.FIELD_HCENTER);

    public CenteringScreen() {        

        super(Manager.NO_VERTICAL_SCROLL); // very important
        // The NO_VERTICAL_SCROLL means that the only Manager added to this Screen - centeringManager -
        // will be given as its maxHeight, the available screen height, regardless of
        // orientation or whether there is a virtual keyboard displayed

        // add Fields to centeredManager
        centeredManager.add(sampleButton);
        centeredManager.add(sampleLabel);
        centeredManager.add(sampleBef);
        centeringManager.add(centeredManager);
        this.add(centeringManager);

    }

}

Tags: BlackBerry Developers

Similar Questions

  • Hide parts of the follow-up process of the workspace

    Currently in the workspace, users have the ability to track the progress of all of their process/application. It's very beneficial in giving the user any idea where their process of

    However, for many use cases, we want to prevent the user to see certain parts of the process. For example, if a loan application is submitted, we want the user to see that she had been submitted correctly, but not necessarily to see the follow-up of the process when it goes through the various levels of approval.

    Is it possible to prevent the tracking of a process after a certain point? Pourrait - it possible to raise a custom event that starts a new process using the original user request?

    The process instance data is always stored in the database. This includes user tasks generated by the process instance, before and after the task assigned to the user workspace in context. Customer initiates a service call for fetching all the tasks generated by a process instance, when selected in the Tracking tab. There is no separate service calls to fetch the tasks belonged to the user for a process instance.

    To hide the tasks not belonging not to the user, the workspace code must be changed to show only the tasks for which the owner is the user in the context.

  • Read only access (to hide part of the config)

    Is there a way to allow read-only access to only part of the config.  I have clients that require read-only access, but I don't want the portions to the config.

    For any help or suggestion would be greatly appreciated.  Thank you

    If they have a connection to enable level, they will be able to see the entire configuration (absence of passwords encrypted assuming you are using the service encryption password).

    You can make more granular connections and prevent customers from, say, the ability to run arbitrary commands such as "show run". For example you could setup a given user to be alllowed to run 'show interface status' etc. NX - OS has this ability almost "cooked in the oven-in." IOS systems, to a little more work.

    Here's a guide to how to do if you use GANYMEDE for AAA:

    https://supportforums.Cisco.com/docs/doc-15765

    If you use local authentication, you can do similar things, using cli views or levels of privilege:

    http://www.Cisco.com/en/us/docs/iOS/12_2t/12_2t13/feature/guide/ftprienh.html

    http://www.Cisco.com/en/us/docs/iOS/12_3t/12_3t7/feature/guide/gtclivws.html

    http://www.NetworkWorld.com/community/node/57553

    I hope this helps.

  • Hide and unhide the field in a form according to the conditions

    Hello Experts,

    Is it possible to hide and show fields in a form according to requirements based on an LOV?

    Thank you

    Hey Kevin,

    You can use javascript to capture all changes to the LOV.

    Put this in a header or some other place where you can put html attributes:

    then, you need the name of the field that you want to hide. That is to say mine is

    div href = "#" id = "f09" style = "" display: none; ">"

    (there is a ' ")<" missing,="" else="" it="" cannot="" be="" shown="/">

    Then you put a javascript function in the header as follows:

    function body_on()
    {
    body var = document.getElementById ('P41_body');
    Body.style.Display = 'block ';
    var head = document.getElementById ('head_image');
    Head.SRC = "#IMAGE_PREFIX#themes/theme_20/collapse_minus.gif";
    }

    function body_off()
    {
    body var = document.getElementById ('P41_body');
    Body.style.display = 'none ';
    var head = document.getElementById ('head_image');
    Head.SRC = "#IMAGE_PREFIX#themes/theme_20/collapse_plus.gif";
    }

    It's to hide / show regions of course.

    Kind regards
    jR

    Published by: jR - ora on 05.01.2010 01:22

  • BlackBerry touch Z30 responds, keyboard not typing in the fields, how to install?

    As the title suggests. I did a reset of the safety, the touch screen works very well and can move around as usual. It is every time I try to type on the keyboard. It depresses and produces noise, but no character come in the fields. I've recently updated to 10.3.2.xxxx now I can't connect to my BB protect in order to access the phone. Its stuck in the installation program.

    What can I do to overcome this? Any help is very appreciated. I know that my loggin and password. Just can't so can not go back to a full backup in link BB.

    Hello and welcome to the community!

    Given what you describe, I would recommend a reloading very clean BONES and also through the unofficial autoloader methods:

    Hopefully that will clear up the problems you encounter (in condition, of course, that this behavior started directly after you have completed the update you mentioned and haven't started some time before that).

    Good luck and let us know!

  • Possible to have an office unmanaged WITHOUT being part of the field?

    Is it possible to add a desktop computer unmanaged to a manual view pool without going through the Office joins the field?  Or is the 'join the field' an absolute requirement?

    I have a few special use case VM that is not on the field.  Issues, is that the passage in credentials does not work so they must authenticate to view using their ad username and password and then log on to the machine VDI with a local account.

  • Tool/Navigator panels hide part of the picture that I'm working on.

    How can I prevent the image I am trying to be obscured by the panels of the tool and Navigator when I select them on the develop Module?

    Press the space bar, which activates the hand tool, and then drag the image as needed.

    Or press Tab to hide the panels, press Tab again to make them reappear.

    You can also right-click on the little arrows on the sides and choose the manual option - in this way that they will not go out when you hover over them.

  • PrE11: Active project box hides part of the monitor preview

    When you select the Adjust button or applied effects the displayed menus convienently slide the control screen to the left.  When you select the active button of the project and the menu unfolds this mask partially the control screen.  It may be more or less depending on the adjustable size of the active project menu.  The control screen don't move the road as with menus setting or applied effects.

    Can monitor preview somehow moved or taken to go?  Can the box of active project be transferred?

    Windows 7 64 bit

    Pre 11 64 bit

    16 GB of ram

    monitor 17 ''

    Thank you.

    Bill

    whsprague wrote:

    Can monitor preview somehow moved or taken to go?  Can the box of active project be transferred?

    No and no. The mobile components from earlier versions (accessible via the window > display host headers) is spent in v11.

    You can refine the drop by positioning the cursor on the right and slippery edge show only three columns.

    Note, however, that the usual behavior of the assets of the project drop-down is turning off when you click outside of it. He is only staying on screen because you chose to pin there.

    See you soon,.
    --
    Neale
    Insanity is hereditary, get you your children

  • Hide text in the field when the drop-down list is selected

    Hello, I am looking for a way to hide text in a text field when a number is from a drop-down list. For example, I have a table with text field that have a line pre-populated text in them. I would like the text to be deleted if 'Yes' is selected in a data entry drop-down list in the text box empty now.   Here's what I have so far:

    If (this.rawValue == 'Yes') {SubStandard_A.StandardPkgTbl.Row1.TextField2.rawValue == ' ' ;}}

    I tried .rawValue == "", .rawValue == null, .clearItems

    Any help is greatly appreciated!

    Hello

    Just spotted your original script had a double == when assigning the value to the rawValue. You must use the double == equality test.

    Here is a sample.

    We hope that make you it work.

    Niall

  • Simple question about the field in 4.7.0 class

    Hi, people.

    No one knows what method of field controls class that the virtual keyboard is displayed when the field is concentrated.

    I implemented a custom field and when it happens the keyboard displayed discussion. And I want to avoid this.

    What is the method that I need to replace to avoid the display of the virtual keyboard?

    Thank you.

    You can use the internal VirtualKeyboard onFocus of your custom field and onUnFocus methods to control the display of the virtual keyboard.

  • How to force the virtual keyboard to hide?

    I am developing an app for BB Storm and I need to force the virtual keyboard to hide and close pushing / croustilleur between the screens.  I tried to set the visibility state of the keyboard during the initialization of each screen via Screen.getVirtualKeyboard () .setVisibility (VirtualKeyboard.HIDE_FORCE), but it does not work.

    The documentation for the keyboard interaction and screen is sparse, at best, I wish RIM would improve their docs.

    I found the problem.  It turns out that only the control (not the screen) who "owns" the virtual keyboard can show/hide it.  So I was able to hide the keyboard by substituting the method onUnFocus of the input area and hide the keyboard.  This seems silly as the reference for the virtual keyboard is obtained from the screen object.

    protected void onUnfocus()
    {
    super.onUnfocus ();
           
    VirtualKeyboard vk is UiApplication.getUiApplication () .getActiveScreen () .getVirtualKeyboard ();.
    vk.setVisibility (VirtualKeyboard.HIDE);
    }

  • BlackBerry smartphones can not hide the virtual keyboard

    Since yesterday, I have not been able to hide the virtual keyboard to quickly slide the finger down through the virtual keyboard.  I can hide it only by pressing the BB and then by choosing Hide keyboard.

    I am afraid that something bad might happen on the phone and I would like to know if there is a way to solve this problem before you return it to the store.

    Thank you.

    you have the latest OS and I do not see this question on my own.

    did you do a battery pull? With the BlackBerry device powered time, remove battery for a few seconds and then reinsert the battery to restart. see if the problem persists after.

  • The virtual keyboard will prevent the display of gestures in some of the screens.

    Hello

    If peripheral BB10 function key a cheap shots left that the keyboard is displayed even if the screen has no control of editfield. How can I disable this behavior on some of the screen.

    Same issue was discussed below thread, but there is one year and no solution:

    https://supportforums.BlackBerry.com/T5/native-development/how-do-I-prevent-the-virtual-keyboard-fro...

    A workaround that I have implemented is to listen BPS events:

    Subscribe (virtualkeyboard_get_domain ());

    then, virtualkeyboard_request_events (0);

    and then, to catch keyboard events and hide the keyboard.

    If (bps_event_get_domain (event) is virtualkeyboard_get_domain())
    {
    virtualkeyboard_hide();
    }

    This workaround works, but the problem is virtual keyboard appears to half way through and dismissed immd.

    I want to completely disable the virtual keyboard to appear on the gesture on some of my screens.

    is this possible? using something in the bar - descriptor.xml? or handling certain events in C++, QML?

    Here is the configuration that I use:

    SDK: 10.1

    Feature: Z10 with software version 10.2

    IDE: Momentics version 2.0

    Thanks in advance.

    I think the problem here is that gestures like this are handled by OS not by an application so you can not stop this behavior.

  • BlackBerry smartphones select, copy, cut, with only the virtual keyboard?

    I hesitated in asking what should be obvious, but I almost exclusively use the manual keyboard, due in part to the ease and accuracy of text (alt + trackball) selection and then proceed to copy etc.

    How to do the same with the virtual keyboard?

    Place the cursor in the right place for the beginning of the word, press the BB button and 'select', highlight the trackball/pad through and again press the BB button and select "copy".

  • How to enter text in the text entry box using the virtual keyboard in a flex application

    Re: How to enter text in the text entry box using the virtual keyboard in a flex application

    Hello

    I'm using flash builder 4.

    I designed the virtual keyboard, I have to update the text in the input text permanently area using the virtual keyboard.

    I used the events.i button does a few he's cheating.

    can someone help me tat.

    Thanks in advance.

    I have included my mxml with this program.

    virtualKeyboard. MXML

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = minHeight = "955" "600" creationComplete = "initfunc ()" >
    < fx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    private function initfunc (): void
    {
    B1.addEventListener (MouseEvent.Click, HandleEvent);
    B2.addEventListener (MouseEvent.Click, HandleEvent);
    B3.addEventListener (MouseEvent.Click, HandleEvent);
    B4.addEventListener (MouseEvent.Click, HandleEvent);
    B5.addEventListener (MouseEvent.Click, HandleEvent);
    B6.addEventListener (MouseEvent.Click, HandleEvent);
    B7.addEventListener (MouseEvent.Click, HandleEvent);
    B8.addEventListener (MouseEvent.Click, HandleEvent);
    B9.addEventListener (MouseEvent.Click, HandleEvent);
    B10.addEventListener (MouseEvent.Click, HandleEvent);
    B11.addEventListener (MouseEvent.Click, HandleEvent);
    B12.addEventListener (MouseEvent.Click, HandleEvent);
    B13.addEventListener (MouseEvent.Click, HandleEvent);
    B14.addEventListener (MouseEvent.Click, HandleEvent);
    B15.addEventListener (MouseEvent.Click, HandleEvent);
    B16.addEventListener (MouseEvent.Click, HandleEvent);
    B17.addEventListener (MouseEvent.Click, HandleEvent);
    B18.addEventListener (MouseEvent.Click, HandleEvent);
    B19.addEventListener (MouseEvent.Click, HandleEvent);


    B20.addEventListener (MouseEvent.Click, HandleEvent);
    B21.addEventListener (MouseEvent.Click, HandleEvent);
    B22.addEventListener (MouseEvent.Click, HandleEvent);
    B23.addEventListener (MouseEvent.Click, HandleEvent);
    B24.addEventListener (MouseEvent.Click, HandleEvent);
    B25.addEventListener (MouseEvent.Click, HandleEvent);
    B26.addEventListener (MouseEvent.Click, HandleEvent);
    B27.addEventListener (MouseEvent.Click, HandleEvent);
    B28.addEventListener (MouseEvent.Click, HandleEvent);
    B29.addEventListener (MouseEvent.Click, HandleEvent);
    B30.addEventListener (MouseEvent.Click, HandleEvent);
    B31.addEventListener (MouseEvent.Click, HandleEvent);
    B32.addEventListener (MouseEvent.Click, HandleEvent);
    B33.addEventListener (MouseEvent.Click, HandleEvent);
    B34.addEventListener (MouseEvent.Click, HandleEvent);
    B35.addEventListener (MouseEvent.Click, HandleEvent);
    B36.addEventListener (MouseEvent.Click, HandleEvent);
    B37.addEventListener (MouseEvent.Click, HandleEvent);
    B38.addEventListener (MouseEvent.Click, HandleEvent);
    B39.addEventListener (MouseEvent.Click, HandleEvent);
    B40.addEventListener (MouseEvent.Click, HandleEvent);
    B41.addEventListener (MouseEvent.Click, HandleEvent);
    B42.addEventListener (MouseEvent.Click, HandleEvent);
    B43.addEventListener (MouseEvent.Click, HandleEvent);
    B44.addEventListener (MouseEvent.Click, HandleEvent);
    B45.addEventListener (MouseEvent.Click, HandleEvent);
    B46.addEventListener (MouseEvent.Click, HandleEvent);
    B47.addEventListener (MouseEvent.Click, HandleEvent);
    B48.addEventListener (MouseEvent.Click, HandleEvent);
    B49.addEventListener (MouseEvent.Click, HandleEvent);
    B50.addEventListener (MouseEvent.Click, HandleEvent);
    B51.addEventListener (MouseEvent.Click, HandleEvent);
    B52.addEventListener (MouseEvent.Click, HandleEvent);
    B53.addEventListener (MouseEvent.Click, HandleEvent);

    }
    public void handleEvent (e: MouseEvent): void
    {
    var a: String = e.target.name;
    Alert.Show (e.Target.Name);
    var b:String = null;
    Switch (a)
    {

    case 'Button20 ':
    b = TextBox.Text;
    TextBox.Text = "a";
    TextBox.Text = b + "a";
    break;


    case 'Button21 ':

    TextBox.Text = "b";
    TextBox.Text = b + "b";
    break;


    by default:

    TextBox.Text = "s";
    TextBox.Text = b + "s";
    }
    }

    []] >
    < / fx:Script >

    < s:Panel = "43" x y = "82" width = "527" height = "213" >
    < mx:Button = "71" x y = '86' id = "b1" label = "1" width = "30" height = "24" / >
    < s:Button = "180" x y = '86' id = "b2" label = "5" width = "30" height = "24" / >
    < s:Button = "127" x y = '86' id = "b3" label = "3" width = "30" height = "24" / >
    < s:Button = "99" x y = '86' id = "b4" label = "2" width = "30" height = "24" / >
    < s:Button = "323" x y = '86' id = "b5" label = "0" width = "30" height = "24" / >
    < s:Button = "294" x y = '86' id = "b6" label = "9" width = "30" height = "24" / >
    < s:Button = "265" x y = '86' id = "b7" label = "8" width = "30" height = "24" / >
    < s:Button x = '237' y = '86' id = "b8" label = "7" width = "30" height = "24" / >
    < s:Button = '209' x y = '86' id = "b9" label = "6" width = "30" height = "24" / >
    < s:Button = "42" x y = '86' id = "b10" label = "" ' "width ="30"height ="24"/ >"
    < s:Button x = "382" y = '86' id = "b11" label = "=" width = "30" height = "24" / >
    < s:Button = '353' x y = '86' id = "b12" label = "» largeur" width = "30" height = "24" / > "
    < s:Button = "410" x y = '86' id = "b13" label = "back" width = "76" height = "24" / >
    < s:Button = "157" x y = '86' id = "b14" label = "4" width = "30" height = "24" / >
    < s:Button = "43" x = "109" id = "b15" label = "tab" width = "66" height = "24" / >
    < s:Button = "105" x = "109" id = "b16" label = "q" width = "31" height = "24" / >
    < s:Button = "247" x = "109" id = "b17" label = "y" width = "30" height = "24" / >
    < s:Button '303' = x y = "109" id = "b18" label = "i" width = "31" height = "24" / >
    < s:Button = "361" x y = '110' id = "b19" label = "p" width = "34" height = "23" / >
    < s:Button = "394" x = "109" id = "b20" label = "[" width = "31" height = "24" / >] "
    < s:Button = "191" x = "109" id = "b21" label = "r" width = "34" height = "24" / >
    < s:Button '424' = x y = "109" id = "b22" label = "]" width = "31" height = "24" / > "
    < s:Button = "222" x = "109" id = "b23" label = "t" width = "31" height = "24" / >
    < s:Button = "161" x = "109" id = "b24" label = "e" width = "31" height = "24" / >
    < s:Button = "133" x = "109" id = "b25" label = "w" width = "31" height = "24" / >
    < s:Button = "332" x = "109" id = "b26" label = "o" width = "31" height = "24" / >
    < s:Button = "275" x = "109" id = "b27" label = "u" width = "31" height = "24" / >
    < s:Button = "220" x = "133" id = "b28" label = "g" width = "31" height = "24" / >
    < s:Button '424' = x y = "132" id = "b29" label = "enter" width = "62" height = "24" / >
    < s:Button = "43" x = "132" id = "b30" label = "caps" width = "66" height = "24" / >
    < s:Button = "275" x = "133" id = "b31" label = "j" width = "42" height = "23" / >
    < s:Button = "314" x = "132" id = "b32" label = "k" width = "31" height = "24" / >
    < s:Button = "133" x = "133" id = "b33" label = "s" width = "31" height = "23" / >
    < s:Button = "161" x = "133" id = "b34" label = "d" width = "31" height = "23" / >
    < s:Button = "250" x = "133" id = "b35" label = "h" width = "31" height = "23" / >
    < s:Button = "105" x = "133" id = "b36" label = "a" width = "31" height = "23" / >
    < s:Button = "191" x = "133" id = "b37" label = "f" width = "31" height = "23" / >
    < s:Button = "342" x = "132" id = "b38" label = "l" width = "31" height = "24" / >
    < s:Button = "152" x = "154" id = "b39" label = "x" width = "31" height = "24" / >
    < s:Button = "353" x = "154" id = "b40" label = "'." " Width = "31" height = "24" / >
    < s:Button = "325" x y = "154" id = "b41" label = "," width = "31" height = "24" / >
    < s:Button = "294" x = "154" id = "b42" label = "m" width = "31" height = "24" / >
    < s:Button = "259" x = "154" id = "b43" label = "n" width = "37" height = "24" / >
    < s:Button = '236' x y = "154" id = "b44" label = "b" width = "31" height = "24" / >
    < s:Button = "211" x = "154" id = "b45" label = "v" width = "31" height = "24" / >
    < s:Button = "181" x = "154" id = "b46" label = "c" width = "31" height = "24" / >
    < s:Button = "122" x = "154" id = "b47" label = "z" width = "31" height = "24" / >
    < s:Button = "380" x = "154" id = "b48" label = "/" width = "31" height = "24" / >
    < s:Button '368' = x y = "132" id = "b49" label width = ';' = "31" height = "24" / >
    < s:Button = "396" x = "132" id = "b50" label = "" ' "width ="31"height ="24"/ >"
    < s:Button = "43" x = "154" id = "b51" label = "shift" width = "82" height = "24" / >
    < s:Button '407' = x y = id = "154" "b52" label = "shift" width = "79" height = "24" / >
    < s:Button = "455" x = "109" id = "b53" label = "------" width = "31" height = "24" / >

    < / s:Panel >
    < s:TextInput = "161" x = "27" id = "textbox" width = "253" / >

    < / s:Application >

    Kind regards

    Saran r

    Hello

    http://gumbo.flashhub.NET/keyboard/

    It is a small example of a 'virtual' keyboard that will enter the text into a textinput/textarea component selected. Capslock and shift key States really aren't quite right (really need control shift/cap lock combo), but there is a simple tab and backspace (delete) and enter the function key.

    hope this is useful

    David.

Maybe you are looking for