{ "id": "93713", "key": "TIMOB-9733", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "93710", "key": "TIMOB-9732", "fields": { "summary": "Ti API:Change the default duration and minimum duration for animation on imageview ", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "13417", "description": "Sprint 2012-13 API", "name": "Sprint 2012-13 API", "archived": true, "released": true, "releaseDate": "2012-07-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-29T14:24:33.000+0000", "created": "2012-06-22T15:24:02.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "parity" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "17949", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "93714", "key": "TIMOB-9734", "fields": { "summary": "MobileWeb: Change the default duration and minimum duration for animation on imageview", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-01-14T03:24:17.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": "Change the default duration and minimum animation time for imageviews to be consistent on all platforms.\r\n\r\nChange it to reflect the following values:\r\n\r\n*Default Duration: 200ms\r\n*Minimum Duration: 30ms\r\n\r\nh3.Testing Instruction.\r\n\r\nKitchenSink > Base UI > ImageViews > animated. \r\n\r\nand to verify it sets the correct default and min time\r\n\r\nh4.please include campfire images from KitchenSink and update the path in line 6 accordingly.\r\n{code}\r\nvar win = Ti.UI.createWindow({fullscreen: false});\r\n// load images\r\nvar images = [];\r\nfor (var i=1;i<18;i++)\r\n{\r\n\timages.push('images/campFire' + ((i<10)?'0'+i:i)+'.gif');\r\n}\r\n\r\nvar imageView = Titanium.UI.createImageView({\r\n\timages:images,\r\n\t//duration:100, // in milliseconds, the time before next frame is shown\r\n\trepeatCount:0, // 0 means animation repeats indefinitely, use > 1 to control repeat count\r\n\ttop:0\r\n});\r\n\r\n\r\nvar frame = Ti.UI.createLabel({\r\n\ttext:'',\r\n\tcolor:'white',\r\n\twidth:'auto',\r\n\theight:'auto',\r\n\tfont:{fontSize:48,fontFamily:'Helvetica Neue'}\r\n});\r\n\r\n\r\n//\r\n// IMAGE VIEW EVENTS\r\n//\r\n\r\n// listen for load event (when all images are loaded)\r\nimageView.addEventListener('load', function(e)\r\n{\r\n\t// hide indicator from app.js\r\n\tTitanium.App.fireEvent('hide_indicator');\r\n\r\n\t// start animation\r\n\timageView.start();\r\n});\r\n\r\n// listen for start event (when animation is started)\r\nimageView.addEventListener('start', function()\r\n{\r\n\tTitanium.API.info('ImageView animation started');\r\n\tl.text = 'Duration = ' + imageView.duration + ' ms (re-start to apply)';\r\n});\r\n\r\n// listen for stop event (when animation is stopped)\r\nimageView.addEventListener('stop', function()\r\n{\r\n\tTitanium.API.info('ImageView animation stopped');\r\n});\r\n\r\n// listen for change event (when animation is changed)\r\nimageView.addEventListener('change', function(e)\r\n{\r\n\tTitanium.API.info('ImageView animation frame has changed, index ' + e.index);\r\n\tframe.text = e.index;\r\n});\r\n\r\nwin.add(imageView);\r\n\r\n//\r\n// CONTROLS\r\n//\r\n\r\n// start animation\r\nvar start = Titanium.UI.createButton({\r\n\ttitle:'Start Animation',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:10,\r\n\tleft:10\r\n});\r\nstart.addEventListener('click', function()\r\n{\r\n\tif (imageView.animating === false)\r\n\t{\r\n\t\timageView.start();\r\n\t}\r\n});\r\nwin.add(start);\r\n\r\n// reverse animation\r\nvar reverse = Titanium.UI.createButton({\r\n\ttitle:'Reverse',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:130,\r\n\tleft:10\r\n});\r\nreverse.addEventListener('click', function()\r\n{\r\n\timageView.reverse = !imageView.reverse;\r\n});\r\nwin.add(reverse);\r\n\r\n// stop animation\r\nvar stop = Titanium.UI.createButton({\r\n\ttitle:'Stop Animation',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:10,\r\n\tright:10\r\n});\r\nstop.addEventListener('click', function()\r\n{\r\n\tif (imageView.animating)\r\n\t{\r\n\t\timageView.stop();\r\n\t}\r\n});\r\nwin.add(stop);\r\n\r\n// pause animation\r\nvar pause = Titanium.UI.createButton({\r\n\ttitle:'Pause Animation',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:90,\r\n\tleft:10\r\n});\r\npause.addEventListener('click', function()\r\n{\r\n\tif (imageView.animating)\r\n\t{\r\n\t\timageView.pause();\r\n\t}\r\n});\r\nwin.add(pause);\r\n\r\n// resume animation\r\nvar resume = Titanium.UI.createButton({\r\n\ttitle:'Resume Animation',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:90,\r\n\tright:10\r\n});\r\nresume.addEventListener('click', function()\r\n{\r\n\tif (imageView.paused)\r\n\t{\r\n\t\timageView.resume();\r\n\t}\r\n});\r\nwin.add(resume);\r\n\r\n// increase duration\r\nvar durationUp = Titanium.UI.createButton({\r\n\ttitle:'Duration++',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:50,\r\n\tleft:10\r\n});\r\n\r\n// help text\r\nvar l = Titanium.UI.createLabel({\r\n\ttext:'Duration = 110 ms (re-start to apply)',\r\n\tbottom:10,\r\n\tcolor:'white',\r\n\twidth:'auto',\r\n\theight:'auto'\r\n});\r\n\r\ndurationUp.addEventListener('click', function()\r\n{\r\n\timageView.duration += 100;\r\n\tl.text = 'Duration = ' + imageView.duration + ' ms (re-start to apply)';\r\n\r\n});\r\nwin.add(durationUp);\r\n\r\n// decrease duration\r\nvar durationDown = Titanium.UI.createButton({\r\n\ttitle:'Duration--',\r\n\theight:30,\r\n\twidth:120,\r\n\tfont:{fontSize:13, fontFamily:'Helvetica Neue'},\r\n\ttop:50,\r\n\tright:10\r\n});\r\n\r\n\r\ndurationDown.addEventListener('click', function()\r\n{\r\n\tif (imageView.duration > 100)\r\n\t{\r\n\t\timageView.duration -= 100;\r\n\t}\r\n\telse if (imageView.duration != 0)\r\n\t{\r\n\t\timageView.duration -= 10;\r\n\t}\r\n\tl.text = 'Duration = ' + imageView.duration + ' ms (re-start to apply)';\r\n\r\n});\r\nwin.add(durationDown);\r\n\r\nwin.add(l);\r\n\r\nwin.add(frame);\r\n\r\n\r\nwin.open();\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Change the default duration and minimum duration for animation on imageview", "creator": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "200940", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR merged https://github.com/appcelerator/titanium_mobile/pull/2469", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-29T14:24:59.000+0000", "updated": "2012-06-29T14:24:59.000+0000" }, { "id": "234141", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with following env.\r\nTitanium SDK:3.0.0.GA\r\nTitanium  Studio:3.0.1.201212181159\r\nDevice: iOS simulator 6.0", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-14T03:24:17.000+0000", "updated": "2013-01-14T03:24:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }