[TIMOB-9824] API: backgroundGradient "colors" default value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-06T04:41:47.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Sprint 2012-15 API, Release 3.0.0 |
Components | TiAPI |
Labels | api, module_view, parity, qe-review, qe-testadded |
Reporter | Josh Roesslein |
Assignee | Karl Rowley |
Created | 2012-06-27T15:06:19.000+0000 |
Updated | 2012-09-06T04:41:47.000+0000 |
Description
We need to define the default behavior for when no "colors" property is specified
in the backgroundGradient object.
Right now on iOS if you specify no value, there will be no visible gradient.
On Android not setting this property to an array causes a Java exception.
We should agree on the "correct" behavior and document it.
On mobile web not specifying a value also causes no visible gradient, like IOS.
Pull request https://github.com/appcelerator/titanium_mobile/pull/2636
Here's the test code from TIMOB-10015. Steps to reproduce (prior to the fix): (1) Remove the colors property from the code below, and run. Expected behavior: View with red/white gradient is not displayed. Actual behavior: App crashes.
If colors are not specified in a backgroundGradient, IOS, Android and mobile web behave the same way -- the view is not displayed. However, it appears that backgroundGradient does not work as expected on mobile web. The test case included in this bug causes a solid red box to be displayed in mobile web.
Verified on: SDK:2.2.0.v20120830182512 Studio:2.2.0.v20120830182512 Devices: iOS simulator, Samsung galaxy tab(android v 3.2), mobile web in browser Now, the color gradient is shown on iOS and android whereas Red color block is being shown on mobile web.
Reopening to update labels