- This topic has 9 replies, 2 voices, and was last updated 12 years, 8 months ago by support-michael.
-
AuthorPosts
-
support-michaelKeymaster@everest
I will provide an example tomorrow.
SonamGyatoMemberdon’t want to rush you, but i’m still waiting for your example
app.creating items dynamically + auto vertical scroll adjust to
the newly added items.
support-michaelKeymaster@everest
I have not forgotten. We had a couple of days delay in the upcoming 1.2.1 maintenance release that will include some improvements for custom list creation among other things. This release is now scheduled for tomorrow (Tue). I will provide a nifty example and an initial how to doc.
support-michaelKeymasterCustom List article posted
I have posted a terse outline of the process I use when creating custom lists. All of the src code is included. Give it a look and let me know what addition info you need.
http://www.genuitec.com/support-mobione/viewtopic.php?f=14&t=1858We plan to provide more list automation and manipulation apis in the future, e.g., connect to data sources, position UI to a specific list-item, add/remove items by index, …
SonamGyatoMemberBeen playing with this custom list app.
When one clicks on a list-item and transitions to the landing page,
how do i know which item was selected.Ideally, like to intercept the click – find out what entry was pressed and
then pass some other string to the landing page.
SonamGyatoMemberOk…i see what you did.
you hard-coded the HREF in the custom file.
i modified it to call my on function()
list.append(
‘<li id=”m1-list-listItem1″ class=”‘ + cssClassList + ‘” href=”javascript:onListSelect(‘ + i + ‘)”>’+
‘ <img id=”m1-list-accessoryImage1″ src=”res/images/tableRowDisclosureIndicator.png”/>’ +
‘ <div id=”m1-list-text2″ class=”m1-text”>Item-‘ + i + ‘</div>’);function onListSelect( item )
{
//alert( item );phoneui.gotoPage( “#m1-landing”, phoneui.transitions.slideLeft );
}minor problem…the selected row stays hi-lighted.
how do i turn the hi-light off.
SonamGyatoMemberthe problem is when you stay on the page – if you
navigate away it’s not a huge issuefunction onListSelect( item )
{
alert( item );
}this causes the problem.
support-michaelKeymaster>minor problem…the selected row stays hi-lighted.
I believe the issue is that on iOS devices a selected list-item remains selected during the transition away to a new page and then momentarily when user transitions back to the page with the selected list-item. I’m discussing with dev team now.
Can you describe how your custom list is meant to work and what effect or feature you would like. For example, do you want the list-item to select on momentarily while mouse-down or other effect?
SonamGyatoMemberi’m trying to size the scrollwindow correctly based on the
number of list-items created dynamically.your sample code Panel with 1 child – a list
which in turn had 2 children – a header and a listitem.i looked at your code
var listHt = 44 * (+itemCnt+1) + 30;
i assume that height of the listitems are 44. how did you
figure that out – because in the gui it’s set to automatic
or is that the default.i assume the itemCnt + 1 is to account for the header.
even though the header height looks to be more than that
of the listitem.what’s the 30 for???
support-michaelKeymaster@everest
> i assume that height of the listitems are 44. how did you figure that out?I sort of did a hack to find it. I grabbed one of the list items and barely extended its height by what looked like 1 px to me. When I released it the properties showed the height at 45 so I picked 44. Also I think I know this value from digging in deeper a long time ago but I forgot it (need one of those LIMITLESS movie pills).
> i assume the itemCnt + 1 is to account for the header.
Correct. I did not try to precisely fit the list into its containing panel. The 30px is just a number I picked that looked OK for the example purposes.
-
AuthorPosts