×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2011
    Location
    ahmedabad
    Posts
    32

    Vertical Scrolling in Custom Item Canvas

    Hi,

    I have created one list using custom item. Now i want to scroll according to the screen size automatically.
    http://www.jappit.com/blog/2008/04/10/building-a-j2me-vertical-scrollable-text-component/

    I have used above link as a reference for building the custom list. Now the problem is in scrolling. My list is having 100 items. But its not automatically adjust in mobile. Focus is not coming properly.

    Can you please help.

    THanks
    Jigar

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Vertical Scrolling in Custom Item Canvas

    Better option will be to use LWUIT, its list can be customized to any extend just like your custom item you can over write the default list renderer and you do not need to worry about get the basic things right like scrolling... check out LWUIT List demo...
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    Nov 2011
    Location
    ahmedabad
    Posts
    32

    Re: Vertical Scrolling in Custom Item Canvas

    I have tried to run lwuit demo many times. But its giving me errors. I am using Net beans 7.1 latest. n lwuit 1.5 MIDP jar i am importing. Simple helloworld demo is not getting installed.

    Thanks
    Jigar Rathod

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Vertical Scrolling in Custom Item Canvas

    Hi Jigar,

    Focus is not coming properly.
    Is your problem related to you not being able to get the focus on touch-enabled series 40 devices? Say you need to tap inside your CustomItem only once in order to modify its contents? If that's the case you might want to check this link.

    Also regarding your problems related to not being able to run the HelloWorld demo, have you ensured that your working environment is properly set up? You could download and integrate a Nokia SDK, if you are not already using one, to your preferred IDE. There are detailed instructions here.

    Last, if you are using Eclipse, it's not enough to add the LWUIT_MIDP.jar to the referenced libraries but you need to Order and Export:
    right click on your working project > select Build Path > choose Configure Build Path > select the Order and Export Tab > check the LWUIT_MIDP.jar and press OK.

  5. #5
    Registered User
    Join Date
    Nov 2011
    Location
    ahmedabad
    Posts
    32

    Re: Vertical Scrolling in Custom Item Canvas

    Is there any other solution then lwuit... Because JAR size is also a big concern for me. I am using Canvas and putting list in to it.

    Thanks
    Jigar

  6. #6
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Vertical Scrolling in Custom Item Canvas

    Hi Jigar,

    There is also the TextEditor component. Would that be something more suitable for you? At the bottom of this page you can find a snippet on how to create a custom scroll bar using layout metrics.

    The full description of the class can be found in Java's Developer Library, under the TextEditor class and the TextEditorListener Interface.

    You can find the platforms that support the TextEditor under this link.
    Last edited by skalogir; 2012-04-17 at 12:21.

Similar Threads

  1. Can custom Item be placed on a Canvas?
    By KevinBoyd in forum Mobile Java General
    Replies: 2
    Last Post: 2009-09-07, 17:48
  2. Vertical Scrolling in Canvas
    By daisy_deepa@yahoo.com in forum Mobile Java Games
    Replies: 2
    Last Post: 2007-10-16, 18:04
  3. Vertical scrolling text with background
    By Elwoodini in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2003-04-23, 00:15
  4. Vertical scrolling text
    By Elwoodini in forum Mobile Java General
    Replies: 0
    Last Post: 2003-04-02, 01:54

Posting Permissions

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