×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    7

    J4ME: Issue in scrolling up and scrolling down components taking more time

    Hi All,

    I want to scroll up and scroll down components in J4ME, but in scrolling up and down components taking more time.
    Because of this application performance degradation, Kindly give me any solution?

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

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    Hi shanu14,

    If I understand correctly, when you perform scrolling in your application, you experience a slower response, in general. Could you give more information on what UI elements you are including in your application, how you are implementing scrolling, what the target devices are and which SDK you are using?
    Could you also provide a code snippet with what you are trying to do, so that I can verify the issue on my end?

  3. #3
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    Hello shanu14,

    and welcome to Nokia Developer Discussion Boards!

    Regarding your question in this discussion thread, are you referring to the same topic which you raised in this thread here?: Thread: J4ME: Issue in touch screen devices of nokia

    If yes then could you post in that other thread only please? This recommendation is in order to avoid crossposting in several threads about a same topic.

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    7

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    Hi skalogir,

    Thanks for reply. Actually i am using the j4me, in that i used the RadioButton Component , i inserted the list in RadioButton component which is more than 50, when i scroll from my key_down event it takes 1 to 2 second to scroll from 1st element to 2nd. I created a sample project below is the link
    The link is: http://dl.dropbox.com/u/13715104/Hotal.zip

    Please reply if you have any idea or you can mail me at shanu.saxena.mt@gmail.com

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

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    Hi shanu14,

    Your code runs fine on high end devices (Symbian) and some old Series 40 ones, like the Nokia 6700 classic, but the traversal of your list is indeed as you describe it, i.e. quite slow on some low end Series 40 devices, like the Nokia Asha 201. If you are targeting high end devices, you should not worry too much. If you are targeting the low end market, the problem in your code is that you are performing a large number of simultaneous calls to the paint() method when the Down key is pressed. I have counted more than 20 paint calls per single key press and this number depends on the number of items in your list. If I keep only a few items (like 5-6) in your list, the code runs better on low end devices, because the concurrent calls to paint are reduced (even though the same number of items are visible in the screen). Low end devices can not handle the speed of screen updates you are requesting. So this is a matter of logic. You will have to modify your code, so that the way you are updating the screen does not depend on the number of items in your list, while reducing the number of calls to paint. Paint only what is needed.

  6. #6
    Registered User
    Join Date
    Dec 2011
    Posts
    7

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    Hi Skalogir,

    Thanks for reply, I am not understanding, how i will do this in my code?

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

    Re: J4ME: Issue in scrolling up and scrolling down components taking more time

    You will need to perform extensive debugging and in case you have not written the code yourself, you will have to find out from which classes the paint method is called. Your code sample is quite big and uses inheritance extensively, so you might need some time to figure that out. Ideally in cases like this, where low level LCDUI Components are used (i.e. painting in Canvas), the position, size and color of the items you want to paint could be kept in a class or a set of variables that represents the current placement of the elements on the screen. Each interaction with the user (like pressing the DOWN key), would result in changes in the class/variable representation of the elements. In this way, you know at any given time, what your screen contains, by just reading the element placement, their color and size from the class/set of variables. In this way a single paint could be performed.

    It might be that extensive re-writting of the code is needed in your case in order to make your current code run smoothly on low end devices. If you just need a long list of items, the user can select from, have you considered using high level LCDUI Components, like a Form or a List?

    You can find more information regarding

    a) Forms here:
    http://library.developer.nokia.com/t...C225CD14A.html

    b) and Lists here:
    http://library.developer.nokia.com/t...207BE4096.html

    If you need further help regarding re-writting your existing code, I suggest using Nokia's Professional Technical Support (this is a paid service):
    http://www.developer.nokia.com/Resou..._support.xhtml

Similar Threads

  1. Scrolling in qt
    By amrutap27 in forum [Archived] Beginning Qt
    Replies: 30
    Last Post: 2011-03-30, 14:23
  2. Replies: 9
    Last Post: 2011-03-14, 07:15
  3. Scrolling up and down.
    By Shweta.Hegde in forum Symbian
    Replies: 4
    Last Post: 2009-03-04, 07:11
  4. scrolling
    By jitendra_j2me in forum Mobile Java General
    Replies: 1
    Last Post: 2008-09-11, 07:58
  5. Add Scrolling
    By nmnir in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-06-02, 07:25

Posting Permissions

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