{ "id": "91354", "key": "TIMOB-8995", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-15T14:10:46.000+0000", "created": "2012-05-04T10:21:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "module_pagingcontrol", "qe-testadded" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-03T10:42:12.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": "Need the following customizations to paging control on IOS\r\n1. Placement of paging control - TOP + BOTTOM (Right now only bottom is supported)\r\n2. Ability to allow paging control to overlap views (Right now it never overlaps)\r\n", "attachment": [], "flagged": false, "summary": "IOS: Add paging control customization", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "193869", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Top, bottom, overlapping are all doable. Vertical orientation and left and right are not. Background color of the rectangle is doable. Selected and unselected color, and shape, are not.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T17:15:37.000+0000", "updated": "2012-05-04T17:15:37.000+0000" }, { "id": "194556", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case\r\n\r\n{code:JavaScript|title:app.js}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n \r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n \r\n \r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win = Titanium.UI.createWindow({ \r\n title:'SCROLLVIEW',\r\n backgroundColor:Ti.UI.iOS.COLOR_SCROLLVIEW_BACKGROUND\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'SCROLLVIEW',\r\n window:win\r\n});\r\n \r\nfunction getOrientation(o)\r\n{ //Came from orientation.js, but we didn't need the buttons and such\r\n\tswitch (o)\r\n\t{\r\n\t\tcase Titanium.UI.PORTRAIT:\r\n\t\t\treturn 'portrait';\r\n\t\tcase Titanium.UI.UPSIDE_PORTRAIT:\r\n\t\t\treturn 'upside portrait';\r\n\t\tcase Titanium.UI.LANDSCAPE_LEFT:\r\n\t\t\treturn 'landscape left';\r\n\t\tcase Titanium.UI.LANDSCAPE_RIGHT:\r\n\t\t\treturn 'landscape right';\r\n\t\tcase Titanium.UI.FACE_UP:\r\n\t\t\treturn 'face up';\r\n\t\tcase Titanium.UI.FACE_DOWN:\r\n\t\t\treturn 'face down';\r\n\t\tcase Titanium.UI.UNKNOWN:\r\n\t\t\treturn 'unknown';\r\n\t}\r\n}\r\n\r\n\r\n\r\n// initialize to all modes\r\nwin.orientationModes = [\r\n\tTitanium.UI.PORTRAIT,\r\n\tTitanium.UI.LANDSCAPE_LEFT,\r\n\tTitanium.UI.LANDSCAPE_RIGHT\r\n];\r\n\r\n\r\n//\r\n// orientation change listener\r\n//\r\nTi.Gesture.addEventListener('orientationchange',function(e)\r\n{\r\n\r\n\t// get orienation from event object\r\n\tvar orientation = getOrientation(e.orientation);\r\n});\r\n\r\nvar view1 = Ti.UI.createView({\r\n\tbackgroundColor:'red'\r\n});\r\nvar l1 = Ti.UI.createLabel({\r\n\ttext:'View 1',\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\theight:'auto'\r\n});\r\nview1.add(l1);\r\n\r\nvar view2 = Ti.UI.createView({\r\n\tbackgroundColor:'blue'\r\n});\r\nvar l2 = Ti.UI.createLabel({\r\n\ttext:'Click Me (View 2 - see log)',\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\theight:'auto'\r\n});\r\nview2.add(l2);\r\n\r\nvar view3 = Ti.UI.createView({\r\n\tbackgroundColor:'green'\r\n});\r\nvar l3 = Ti.UI.createLabel({\r\n\ttext:'View 3',\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\theight:'auto'\r\n});\r\nview3.add(l3);\r\n\r\nvar view4 = Ti.UI.createView({\r\n\tbackgroundColor:'black'\r\n});\r\nvar l4 = Ti.UI.createLabel({\r\n\ttext:'View 4',\r\n\tcolor:'#fff',\r\n\twidth:'auto',\r\n\theight:'auto'\r\n});\r\nview4.add(l4);\r\n\r\n\r\nvar scrollView = Titanium.UI.createScrollableView({\r\n\tviews:[view1,view2,view3,view4],\r\n\tshowPagingControl:true,\r\n\tpagingControlHeight:30,\r\n\tmaxZoomScale:2.0,\r\n\tcurrentPage:1,\r\n\tbackgroundColor:'grey',\r\n\t\r\n});\r\n\r\nwin.add(scrollView);\r\n\r\nvar i=1;\r\nvar activeView = view1;\r\n\r\nscrollView.addEventListener('scroll', function(e)\r\n{\r\n\tactiveView = e.view; // the object handle to the view that is about to become visible\r\n\ti = e.currentPage;\r\n\tTitanium.API.info(\"scroll called - current index \" + i + ' active view ' + activeView);\r\n});\r\nscrollView.addEventListener('click', function(e)\r\n{\r\n\tTi.API.info('ScrollView received click event, source = ' + e.source);\r\n});\r\nscrollView.addEventListener('touchend', function(e)\r\n{\r\n\tTi.API.info('ScrollView received touchend event, source = ' + e.source);\r\n});\r\n\r\n// add button to dynamically add a view\r\nvar alpha = Titanium.UI.createButton({\r\n\ttitle:'1.0',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\nalpha.addEventListener('click',function()\r\n{\r\n\tscrollView.pagingControlAlpha = 1.0;\r\n});\r\nvar alphaoff = Titanium.UI.createButton({\r\n\ttitle:'0.0',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\nalphaoff.addEventListener('click',function()\r\n{\r\n\tscrollView.pagingControlAlpha = 0.0;\r\n});\r\nvar alphahalfoff = Titanium.UI.createButton({\r\n\ttitle:'0.5',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\nalphahalfoff.addEventListener('click',function()\r\n{\r\n\tscrollView.pagingControlAlpha = 0.5;\r\n});\r\n// jump button to dynamically change go directly to a page (non-animated)\r\nvar jump = Titanium.UI.createButton({\r\n\ttitle:'Jump',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\njump.addEventListener('click',function()\r\n{\r\n\ti = (scrollView.currentPage + 1) % scrollView.views.length;\r\n\tscrollView.currentPage = i;\r\n});\r\n\r\n// change button to dynamically change a view\r\nvar top = Titanium.UI.createButton({\r\n\ttitle:'top',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\ntop.addEventListener('click',function()\r\n{\r\n\tscrollView.pagingControlOnTop = true;\r\n});\r\nvar bottom = Titanium.UI.createButton({\r\n\ttitle:'bottom',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\nbottom.addEventListener('click',function()\r\n{\r\n\tscrollView.pagingControlOnTop = false;\r\n});\r\nvar overlaytrue = Titanium.UI.createButton({\r\n\ttitle:'OvrT',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\noverlaytrue.addEventListener('click',function()\r\n{\r\n\tscrollView.overlayEnabled = true;\r\n});\r\nvar overlayfalse = Titanium.UI.createButton({\r\n\ttitle:'OvrF',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\noverlayfalse.addEventListener('click',function()\r\n{\r\n\tscrollView.overlayEnabled = false;\r\n});\r\n// move scroll view left\r\nvar left = Titanium.UI.createButton({\r\n\timage:'../images/icon_arrow_left.png'\r\n});\r\nleft.addEventListener('click', function(e)\r\n{\r\n\tif (i === 0){ return; }\r\n\ti--;\r\n\tscrollView.scrollToView(i);\r\n});\r\n\r\n// move scroll view right\r\nvar right = Titanium.UI.createButton({\r\n\timage:'../images/icon_arrow_right.png'\r\n});\r\nright.addEventListener('click', function(e)\r\n{\r\n\tif (i === (scrollView.views.length-1)){ return; }\r\n\ti++;\r\n\tscrollView.scrollToView(scrollView.views[i]);\r\n});\r\nvar checkValuesOnConsole = Titanium.UI.createButton({\r\n\ttitle:'check',\r\n\tstyle:Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\ncheckValuesOnConsole.addEventListener('click',function()\r\n{\r\n\tTi.API.info(\"pagingControlAlpha : \"+scrollView.pagingControlAlpha);\r\n\tTi.API.info(\"pagingControlOnTop : \"+scrollView.pagingControlOnTop);\r\n\tTi.API.info(\"overlayEnabled : \"+scrollView.overlayEnabled);\r\n\t//Ti.API.info(\"pagingControlHeight\"+scrollView.pagingControlHeight);\r\n\t//Ti.API.info(\"showPagingControl\"+scrollView.showPagingControl);\r\n});\r\n\r\nif (Titanium.Platform.osname == 'iphone' || Titanium.Platform.osname == 'ipad')\r\n{\r\n\t// set toolbar\r\n\twin.setToolbar([alpha,alphahalfoff,alphaoff,overlaytrue,overlayfalse,checkValuesOnConsole]);\r\n}\r\nwin.setRightNavButton(top);\r\nwin.setLeftNavButton(bottom);\r\n\r\n//\r\ntabGroup.addTab(tab1); \r\n\r\n \r\n \r\n \r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-11T12:04:13.000+0000", "updated": "2012-05-11T12:04:13.000+0000" }, { "id": "198261", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio build 2.1.0.201206111802\r\nTi Mobile SDK 2.1.0.v20120612102301 hash refeef019\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.1\r\n\r\nVerified that the example code showed the expected behavior of changing the opacity, location, and overlay of the paging control", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T16:02:27.000+0000", "updated": "2012-06-12T16:02:27.000+0000" }, { "id": "282096", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "anvil test case added.\nPR link:\nhttps://github.com/appcelerator/titanium_mobile/pull/4943", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-03T10:42:12.000+0000", "updated": "2013-12-03T10:42:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }