×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    BorderLayout bug in LWUIT for the new Asha Platform

    Hello all

    I tried adding three buttons to a container having border layout.However, the second button doesnot appear at all.This never happened with LWUIT for Asha Full Touch version.Kindly help me.I have attached the source code and the screen shot of the emulator


    Code:
     Form f = new Form("Test");
            Container test = new Container();
            Button a = new Button("First");
            Button b =new Button("Second");
            Button c = new Button("Third");
            
            BorderLayout bl = new BorderLayout();
            bl.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE);
            test.setLayout(bl);
                    
            test.addComponent(BorderLayout.WEST,a);
            test.addComponent(BorderLayout.CENTER,b);
            test.addComponent(BorderLayout.EAST,c);
                    
            f.addComponent(test);
            f.show();
    The screenshot of the output



    As a workaround,I had to use coordinate layout and set the X and Y coordinates of the buttons manually to get the desired effect.
    Last edited by arunkam; 2013-06-10 at 20:44.

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

    Re: BorderLayout bug in LWUIT for the new Asha Platform

    I have tried your code and got this result (which seems ok to me)
    form-code-test.png

  3. #3
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: BorderLayout bug in LWUIT for the new Asha Platform

    This problem occurs only when I use the LWUIT for Asha 2013 file (S40-asha2013.jar) which comes along with the new Asha SDK 1.0. LWUIT for Asha Fulltouch and other versions do not cause this problem.

    And I also noticed that the second button appears if the orientation is in landscape.It appears that the portrait orientation somehow hides the second button.
    Last edited by arunkam; 2013-06-12 at 08:38.

Similar Threads

  1. LWUIT TextField issue (Asha FullTouch )
    By bogus40 in forum Mobile Java UI and User Experience
    Replies: 6
    Last Post: 2014-03-21, 08:22
  2. How to catch Asha 501 Back button in LWUIT?
    By mikkori in forum Mobile Java UI and User Experience
    Replies: 3
    Last Post: 2013-12-17, 10:31
  3. Which LWUIT plugin for Asha SDK 1.0
    By bogus40 in forum Mobile Java UI and User Experience
    Replies: 5
    Last Post: 2013-07-06, 11:48
  4. LWUIT BorderLayout
    By dschmider in forum Mobile Java General
    Replies: 2
    Last Post: 2010-03-09, 07:23

Posting Permissions

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