facebook

creating a scrollable list

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #318103 Reply

    SonamGyato
    Member

    I need a list w/ items added dynamically that might require
    vertical scrolling.

    i added a panel container.

    added one child – list.

    and then several list-item children.

    looks to scroll, one needs to set the panel’s Content Area Height.

    how can this be set dynamically – depending on the number of
    list-item entries

    thanks.

    #325964

    wfoster
    Member

    Anybody know this?
    This question is posted almost a year ago.

    #325966

    wfoster
    Member

    Setting panel’s Content Area Height works, but how to do this dynamically when
    list is created at runtime?

    @wfoster wrote:

    Anybody know this?
    This question is posted almost a year ago.

    #326184

    JohnJake2
    Member

    Hi wfoster.

    This issue is described and almost solved in an earlier post:
    http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=1858&hilit=Content+area+height

    My problem is that I tried to use this part of the code to dynamically adapt the panel’s size in order to scroll the panel in the correct size:

    $(‘#m1-theform-scrollpanel-scroller’).attr(‘data-layout-content-height’, panelHt);
    alert ($(‘#m1-theform-scrollpanel-scroller’).attr(‘data-layout-content-height’));

    But this code is not working. You can set the value (in my case somthing about 800 px) and it seems to be set correctly (shown in my alert-debug), but it doen’t change anything.

    I redesigned the complete app, but no success. Later on I made a new test app; complete code is attached. There I tried to split a string into an array and calculate the new panel’s data-layout-content-height attribute. No success as well.

    Could it be, that this feature is no longer working with MobiOne 1.5? I saw many differentc lasses used in the main projects .xml file (.mobi-file).


    @Support
    (Wayne?!): Can you please check the attached project. Where is my mistake? In this special case, the list shall be scrollable not only for the predefined size of 422 px (about 10 Items), I want to scroll for 17 items.

    Thx, JohnJake (my former account cannot be used anymore).

    Attachments:
    You must be logged in to view attached files.
    #326208

    JohnJake2
    Member

    Hi Octavio.

    Thx for your help. At first sight it seems to work. But when I leave the form, e. g. change to an about dialog and come back via back-button, the size of the panel reverted back to the original size (in most cases, too small).

    Is there a solution for this? I checked the transition function:

    phoneui.prePageTransition = function(currentPageId,targetPageId) {
    // add custom pre-transition code here
    // return false to terminate transition
    return true;
    }

    But there I have to get the complete list again in order to determine the size of it.
    Is there any better solution??

    And just another thing: Could you pleaese “reanimate” my old account “JohnJake”. I cannot use it any longer since the captcha input, required after five invalid logins, isn’t producing any graphics. So I cannot log on. – And I received none of your emails. What address did you take?

    Thx in advance.
    JohnJake(2).

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: creating a scrollable list

You must be logged in to post in the forum log in