×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    148

    How to implement kinetic scrolling?

    I have just upgraded my N97 to the v20 firmware , which implements kinetic scrolling in apps. I did indeed see kinetic scrolling working fine in Web, but it doesn't work automatically in my own app, neither in system listboxes, nor in my own view with it's own CEikScrollBarFrame.

    Worse, scrolling, i.e dragging the scrollbars, in my listboxes has stopped working.

    So I would like to know how to get kinetic scrolling working, and what I need to to to make sure that it also works for standard listboxes.

    This is for apps developed on the generic S60 5th ed sdk. I do not use the N97 plugin as I like to keep my code as device-independent as possible, and that is already hard enough at this time.

    An update: I found now that kinetic scrolling works when the listbox is a child of a CAknView-hosted container, but not when the listbox is a child of a plain CCoeControl. The code for creating the listbox is the same, and both listboxex are CAknSingleGraphicStyleListBoxes.
    Last edited by svdwal; 2009-10-28 at 20:16.
    Sander van der Wal
    www.mBrainSoftware.com

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    148

    Re: How to implement kinetic scrolling?

    Quote Originally Posted by svdwal View Post
    I have just upgraded my N97 to the v20 firmware , which implements kinetic scrolling in apps. I did indeed see kinetic scrolling working fine in Web, but it doesn't work automatically in my own app, neither in system listboxes, nor in my own view with it's own CEikScrollBarFrame.

    [knip]

    An update: I found now that kinetic scrolling works when the listbox is a child of a CAknView-hosted container, but not when the listbox is a child of a plain CCoeControl. The code for creating the listbox is the same, and both listboxex are CAknSingleGraphicStyleListBoxes.
    In case anybody is interested, the problem was that the listbox in the container was not ActivateL()'ed, due to it being destroyed and recreated depending on the orientation (one kind of listbox in portrait mode, and another kind in landscape mode). This worked fine before kinetic scrolling was implemented, but now it doesn't anymore.

    The problem with getting kinetic scrolling to work for my own custom view is still there.

    I have done some hacking (overriding the AppUI's HandleWSEventL() to display what events are being sent), and it appears that kinetic scrolling is implemented by the system by sending drag events until scrolling has stopped. In ohter words, EButton1Up is not send as soon as you lift your finger, but later. It looks to your code as if the user is dragging it's finger in such a way that it is moving slower and slower and that the finger at some point stops. This should indeed mean that all controls will automatically support kinetic scrolling, but I would like to know if there are other issues involved, as I don't see much kinetic "dragging" happening in my custom view, ie it appears as if I get a EButton1Up event as soon as I really lift my finger. Are there things like window sizes and/or CCoeControl sizes to be be specified that are bigger than the screen or does the system expect some specific calls to be made (like RDrawableWindow::Scroll()).
    Last edited by svdwal; 2009-11-03 at 08:56.
    Sander van der Wal
    www.mBrainSoftware.com

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    9

    Re: How to implement kinetic scrolling?

    The solution is simple, if you have a look at the following Android classes (and port it):

    Take a basic scroller class Scroller:
    http://www.netmite.com/android/mydro.../Scroller.java

    that use one of the following interpolaters:
    base:
    http://www.netmite.com/android/mydro...erpolator.java

    specific:
    http://www.netmite.com/android/mydro...erpolator.java
    http://www.netmite.com/android/mydro...erpolator.java

    I personal use a CPeriod for the scroller animation in my custom control, and request the Scroller class for the new position (using CDecelerateInterpolator in SCROLL_MODE) and move to it. Result is very smooth.

    kindly regards,

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    148

    Re: How to implement kinetic scrolling?

    Adding my own kinetic scrolling code is absolutely not a solution.

    As you should be able to see from my description of the events being delivered, you cannot see that the pen up event is a real one (when I lift my finger from the screen) or a "fake" one (delivered after the kinetic scroller has decided it is time to stop scrolling). Assuming the kinetic scroller will never work for my control is one of those assumptions that will create an endless number of user problem reports as soon as Nokia decides to do something different in a new firmware version.
    Sander van der Wal
    www.mBrainSoftware.com

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    7

    Re: How to implement kinetic scrolling?

    I am currently tryign to do exactly the same thing and running into similar problems.
    If you get it working then please let me know. Anything I find out I'll post here.
    I'm actually using list boxes derived form CEikTextlistBox so there may be some differences.

  6. #6
    Registered User
    Join Date
    Feb 2009
    Location
    Cluj Napoca, Romania
    Posts
    8

    Re: How to implement kinetic scrolling?

    Search about CAknPhysiscs, I don't think is public, but if you get lucky it will do the trick for you.
    God, give me patience, but give it to me now!

  7. #7
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: How to implement kinetic scrolling?

    Quote Originally Posted by nash00cu View Post
    Search about CAknPhysiscs, I don't think is public, but if you get lucky it will do the trick for you.
    If you don't think the class is public then maybe you should think twice about even mentioning it. Luck has nothing to do with accessing and using an API.

    As usual for non-SDK features a support request, eventually followed by API Partnering, will give the correct solution for any problem.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    7

    Re: How to implement kinetic scrolling?

    Hi, I managed to get this working with a custom CEikTextListBox.
    What I found was you need to activate (as already mentioned)
    Have to display the scrollbars - not figured out how to display just when flicking just yet but If I turn the scrollbars off then the flick has no effect.
    There are additional apis in the N97 sdk which may help but I avoided using them.

  9. #9
    Registered User
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    305

    Re: How to implement kinetic scrolling?

    go trought symbian web browser
    http://developer.symbian.org/oss/FCL..._gesturehelper

    Kinetic scrolling is alreaady implement in it
    And you can simply add bounce effect

Similar Threads

  1. /I_Want_To/Receive_Testing_Signing_and_Technical_Support/
    By aaumala in forum Automatic Feedback Channel
    Replies: 345
    Last Post: 2009-11-30, 17:59
  2. When will 5800XM get kinetic scrolling?
    By stolidImran in forum General Development Questions
    Replies: 1
    Last Post: 2009-09-04, 07:48
  3. How to make kinetic scrolling effect on listbox?
    By Mozart2007 in forum Symbian
    Replies: 1
    Last Post: 2009-07-16, 05:08
  4. Replies: 4
    Last Post: 2009-06-10, 09:47
  5. Scrolling the Zoomed Image
    By rajasg in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-08-13, 09:59

Posting Permissions

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