×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    41

    How do I make LWUIT tabs occupy the entire screen width for non-touch devices?

    Hi Experts!

    How do I make LWUIT tabs occupy the entire screen width for non-touch devices? When I launch the LWUIT Demo, I noticed that for touch and type and full touch platforms, it does stretch up to the screen width. However, for non-touch devices, it does not and will only use up to the tab's actual size. I have a feeling that the theme can be adjusted from the resource editor to achieve the behavior that I want but for the life of me, I can't figure out which property needs to be set.

    Thanks,
    Jim

  2. #2
    Registered User
    Join Date
    Mar 2013
    Location
    United Kingdom
    Posts
    161

    Re: How do I make LWUIT tabs occupy the entire screen width for non-touch devices?

    Which example are you referring to so I can load it up and recreate what you're seeing?

  3. #3
    Registered User
    Join Date
    Feb 2013
    Posts
    41

    Re: How do I make LWUIT tabs occupy the entire screen width for non-touch devices?

    It's the LWUIT Demo, found in https://projects.developer.nokia.com...leApplications

    It's also part of the Nokia SDK, under <Nokia SDK Path>\plugins\lwuit\examples\LWUITDemo

  4. #4
    Registered User
    Join Date
    Feb 2013
    Posts
    41

    Re: How do I make LWUIT tabs occupy the entire screen width for non-touch devices?

    So I finally settled on a solution where I had to go through each components inside the tabs container and set its width manually like so:

    Code:
    final Container container = m_tabs.getTabsContainer();
    int count = container.getComponentCount();
    int width = Display.getInstance().getDisplayWidth() / count;
    for (int x = 0; x < count; ++x) {
    	container.getComponentAt(x).setPreferredW(width);
    }
    It works so I am happy with it but more work is probably needed if you support switching from landscape to portrait orientations as the component width is not computed by the layout container.

Similar Threads

  1. LWUIT TextArea - edit on focus for non-touch devices?
    By lordbritishix1982 in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2013-04-30, 17:53
  2. How to display a Form Screen on LWUIT Tabs?
    By pavanragi in forum Mobile Java General
    Replies: 3
    Last Post: 2012-08-09, 09:42
  3. WRTkit and touch screen devices
    By hp3 in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2009-06-30, 09:44
  4. nokia 5800, touch screen and lwuit
    By -Icaro- in forum Mobile Java General
    Replies: 6
    Last Post: 2009-04-28, 15:10
  5. Replies: 0
    Last Post: 2008-12-28, 16:00

Posting Permissions

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