{ "id": "60751", "key": "TIMOB-119", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11213", "name": "Release 0.7.0", "archived": true, "released": true, "releaseDate": "2009-10-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:52:03.000+0000", "created": "2011-04-15T02:23:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:52:03.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Purpose

\n

Provide a set of Web Views that can be scrolled through\nleft-to-right or right-to-left.

\n

API Spec

\n
\n\n//  create views \n// NOTE VIEWS CAN BE WebViews, TableViews, GroupedViews or Image Views (new)\nvar view1 = Titanium.UI.createWebView({url:'view1.html'});\nvar view2 = Titanium.UI.createWebView({url:'view2.html'});\nvar view3 = Titanium.UI.createWebView({url:'view3.html'});\nvar view4 = Titanium.UI.createWebView({url:'view4.html'});\n\n// create scrollable view\n// NOTE pagingControl is probably iPhone only\nTitanium.UI.createScrollableView({\n    views:[view1, view2, view3, view4],\n    showPagingControl:true\n});\n\n// add view to window\nTitanium.UI.currentWindow.addView(scrollableView);\n\n// show view\nTitanium.UI.currentWindow.showView(scrollableView);\n\n// scroll to a particular view by index\nscrollableView.scrollToView(0);\n\n// scroll to a particular view by instance\nscrollableView.scrollToView(view2);\n\nscrollableView.addEventListener('scroll', function(e)\n{\n    e.view  // the object handle to the view that is about to become visible\n});\n
{html}", "attachment": [], "flagged": false, "summary": "API - Horizontal Scrollable Views", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "122780", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I was actually thinking more of:

\n

var view1 = Titanium.UI.createWebView({url:'view1.html'});
\nvar view2 = Titanium.UI.createWebView({url:'view2.html'});
\nvar view3 = Titanium.UI.createWebView({url:'view3.html'});
\nvar view4 = Titanium.UI.createWebView({url:'view4.html'});

\n

Titanium.UI.currentWindow.addView(view1);
\nTitanium.UI.currentWindow.addView(view2);
\nTitanium.UI.currentWindow.addView(view3);
\nTitanium.UI.currentWindow.addView(view4);

\n

Titanium.UI.currentWindow.showScrollingViews([view1, view2,\nview3, view4]);

\n

The reasons being that each html page at this scale should be\nable to have full access to Titanium. That means each web page\nneeds to be its own webView already.

\n

That would mean a scrollableView that has subviews. I'm hesitant\nto do this as it does change more underlying assumptions (IE, that\na view's superview is no longer the window) as well as opens up\nsome recursion issues (What happens when you have a scrollableView\nthat contains a scrollableView, or better yet, contains\nitself?).

\n

By moving the scrollableView's abilities to be a property of the\nuserWindow makes it easier to maintain the relationship as well as\nmakes it much easier to handle edge cases (IE, to have the page\ncontrol stay placed above and not overlap the toolbar).

\n

The example above is rather verbose. Would it be better\nfunctionality that implicit adds are allowed? (IE,\nsetScrollingViews adds views when necessary?)

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:23:53.000+0000", "updated": "2011-04-15T02:23:53.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }