[TIMOB-1124] Android: Add support for backgroundGradient on views
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-06T23:49:55.000+0000 |
Affected Version/s | Release 1.7.5, Release 1.8.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API |
Components | Android |
Labels | api, parity, qe-testadded |
Reporter | Don Thorp |
Assignee | Josh Roesslein |
Created | 2011-04-15T02:44:40.000+0000 |
Updated | 2013-11-07T05:38:30.000+0000 |
Description
Implement backgroundGradient support on Android.
Note: Only linear gradient is supported. A future task will
be created to implement radial support.
Linear Gradient Test Case
var win = Ti.UI.createWindow({backgroundColor: 'black'});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
}
});
win.add(linearGradient);
win.open();
Compare rendering against iOS & MobileWeb to verify correct behavior.
Attachments
File | Date | Size |
---|---|---|
android.png | 2012-06-11T15:34:11.000+0000 | 16889 |
iOS.png | 2012-06-11T15:34:11.000+0000 | 119521 |
klist'd
TIMOB-9366 is the task for implementing radial gradient support.
Pull request [#2313](https://github.com/appcelerator/titanium_mobile/pull/2313) ready.
Closing as Fixed. Attaching screenshots of fixed android and current ios behavior. SDK: 2.1.0.v20120608174150 Studio: 2.1.0.201206081630 OS: Snow Leopard Android Runtimes: V8 Devices Tested: Nexus One 2.2.2, Galaxy Nexus 4.0.3
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4887