{ "id": "95029", "key": "TIMOB-10076", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14813", "description": "2013 Sprint 03", "name": "2013 Sprint 03", "archived": true, "released": true, "releaseDate": "2013-02-11" }, { "id": "15275", "description": "2013 Sprint 04 Core", "name": "2013 Sprint 04 Core", "archived": true, "released": true, "releaseDate": "2013-02-25" }, { "id": "14814", "description": "2013 Sprint 04", "name": "2013 Sprint 04", "archived": true, "released": true, "releaseDate": "2013-02-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-02-12T01:18:42.000+0000", "created": "2012-07-12T11:41:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "exalture", "module_views", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2013-09-30T09:08:13.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4.Problem\r\nThe endPoint property of a Gradient (as seen in the documentation [here|http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Gradient-property-endPoint]) is documented as defaulting to {\"y\": 1.0, \"x\": 0.0}. It does not. If left unspecified, the gradient is not applied. Also, setting y to 1.0 (as the same documentation shows) does not work...it must be set to '100%'.\r\n\r\nh2. Problem description\r\nGradient endPoint property does not work as documented and doesn't take the default value properly.\r\n\r\nh2. Steps to reproduce\r\n1. Run the following code. The square is solid red.\r\n2. Uncomment the \"1st test\" line and run again. The box still appears solid red.\r\n3. Now comment back out the \"1st test\" line, uncomment the \"2nd test\" line, and run again. Now the box appears with the correct gradient.\r\n\r\n{panel:title=app.js}\r\n{code}\r\nvar win1=Ti.UI.createWindow({\r\n layout:'vertical',\r\n backgroundColor:'gray',\r\n exitOnClose:true,\r\n navBarHidden:true\r\n });\r\n\r\nvar view1=Ti.UI.createView({\r\n height:100,\r\n width:100,\r\n backgroundGradient:{type:'linear',\r\n //endPoint:{ x:0, y:1.0 }, // 1st test\r\n //endPoint:{ x:0, y:'100%' }, // 2nd test\r\n colors:[ {color:'white',\r\n offset:0.0},\r\n {color:'red',\r\n offset:1.0} ]}\r\n });\r\nwin1.add(view1);\r\n\r\nwin1.open();\r\n{code}\r\n{panel}\r\n\r\n\r\nh2. Expected result\r\nA white-to-red vertical gradient box should appear at the top of the screen, but instead the box is completely red.\r\n\r\nh2. Additional notes\r\nUsing float values for the parameters never work: setting e.g. y=0.5 shows a completely white box. It works fine if setting is 50%.", "attachment": [], "flagged": false, "summary": "Android: Gradient endPoint property, when unspecified, doesn't adopt its documented default value", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Android 2.2 emulator\r\n- Titanium Mobile SDK 2.1.0.GA\r\n- Titanium Studio 2.1.0.201206251749\r\n", "comment": { "comments": [ { "id": "203112", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Also, the documentation (link specified in \"Problem\" section) lacks the Android glyph to show that Gradient can be used on Android...it just shows iPhone, iPad, and MW glyphs.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-13T06:23:04.000+0000", "updated": "2012-07-13T06:23:04.000+0000" }, { "id": "226258", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a layout issue. Re-assigning to core.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-06T00:27:06.000+0000", "updated": "2012-11-06T00:27:06.000+0000" }, { "id": "238089", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3843", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-12T01:21:08.000+0000", "updated": "2013-02-12T01:21:08.000+0000" }, { "id": "240341", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with: \r\nSDK:3.1.0.v20130228145653\r\nStudio: 3.1.0.201302252142\r\nDevice: Samsung tab(v 3.2)\r\n\r\nworks as expected", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-01T10:50:33.000+0000", "updated": "2013-03-01T10:50:33.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }