×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    5

    LWUIT TextField issue (Asha FullTouch )

    Hi,

    I use LWUIT plugin from Nokia\Devices\Nokia_Asha_SDK_1_0\plugins\lwuit\lib\sdk2.0\S40-full-touch.jar in my project.
    All works OK despite touch on TextField. It doesn't open VirtualKeyboard after my touch. I have to tap TextField many times to open VK.
    It works very random. It should open VK after first tap on TextField.

    And one think more. After back from VK I see blinking cursor in my TextField.

    My code snippet:
    Code:
            txtFrom = new TextField(5);
            txtFrom.setConstraint(TextField.DECIMAL); // shows VB with numbers only
            txtFrom.setText("1"); // initial value
            ctnWest.addComponent(txtFrom);
            txtFrom.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
      ...
                    evt.consume();
                }
            });
            txtFrom.addDataChangeListener(new DataChangedListener() {
                public void dataChanged(int type, int index) {
    ...
                }
            });


    Have someone met some issue? I launch this app on Nokia Asha 311 and Nokia Asha 310.

    Thanks for help.

    Regards,
    Bogus

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2011
    Posts
    79

    Re: LWUIT TextField issue (Asha FullTouch )

    Hi,

    LWUIT in Asha SDK 1.0 beta is optimised specifically for this new platform. At least during beta period it might exhibit all kind of strange behaviour, especially if you target Series 40 Full Touch Asha's, such as 311, 310. I would suggest to do following:

    - Check, if behaviour correct on new Asha emulator;
    - try it on older SDK, to see if it works correctly.

    Best

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    5

    Re: LWUIT TextField issue (Asha FullTouch )

    Thanks for your reply.

    I put LWUIT plugin dedicated for Nokia Asha 2.0. Now touch on TextField works excellent but disappared back command (set by setBackCommand()) ?!?
    I use CategoryBar but before I enter this view I turn off CB and add back command but this back-arrow in right-down corner is not show anymore.

    I use LWUIT from Nokia\Devices\Nokia_SDK_2_0_Java\plugins\lwuit\bin\sdk2.0\S40-full-touch.jar (828 512 bytes).

    Regards,
    Bogus

  4. #4
    Nokia Developer Champion
    Join Date
    Aug 2010
    Location
    Ahmedabad
    Posts
    299

    Re: LWUIT TextField issue (Asha FullTouch )

    Try to set focus on your textfield. The VK will open directly. Something like this.

    Code:
     Display.init(this);
            Form myform = new Form("New Form");
            TextField txtFrom = new TextField(5);
            txtFrom.setConstraint(TextField.DECIMAL); // shows VB with numbers only
            txtFrom.setText("1"); // initial value
            txtFrom.setFocus(true); //THIS WILL FOCUS ON THIS TEXT FIELD AND VK WILL OPEN DIRECTLY. NO NEED TO TAP.
            myform.addComponent(txtFrom);
            myform.show();

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: LWUIT TextField issue (Asha FullTouch )

    Girishpadia: please see my comments from the other thread.
    Bogus40: i think your problem is the following code
    txtFrom.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    ...
    evt.consume();
    }
    });

    Why are you consuming the event of actionPerformed for the textfield and wont let it propegate?
    Remove the evt.consume(); and try again.

  6. #6
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: LWUIT TextField issue (Asha FullTouch )

    This is a great observation. Although I didn't try, but this should be the issue.

  7. #7
    Registered User
    Join Date
    Jan 2014
    Posts
    1

    Re: LWUIT TextField issue (Asha FullTouch )

    I also faced this issue in project. The following scenarios have this type of problem. (It will help some one)

    1) When you are using two text fields and two text fields have set focus true. (solution: Make only one text field as set focus true)
    2) Please don't call your LWUIT form from Dialog box, Timer Task and any own interface methods. Due-to this reason also problems will come.

Similar Threads

  1. Problem with LWUIT Theme in Nokia Asha 311
    By harsha921 in forum Mobile Java General
    Replies: 3
    Last Post: 2012-09-05, 10:11
  2. LWUIT TextField - Removing InputModeOrder Text "Abc" from TextField
    By vishal.vpb in forum Mobile Java General
    Replies: 1
    Last Post: 2011-11-14, 06:29
  3. How to display message while we select the textfield in lwuit
    By murugacse4 in forum Mobile Java General
    Replies: 1
    Last Post: 2011-10-03, 06:06
  4. LWUIT TextField..?
    By kumar1234567 in forum Mobile Java General
    Replies: 5
    Last Post: 2011-08-04, 08:47
  5. Problem with lwuit TextField
    By kumarv75 in forum Mobile Java General
    Replies: 12
    Last Post: 2010-11-19, 07:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×