[TIMOB-12775] Android: Implement default values for view properties
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-02-23T02:52:34.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 04 API |
Components | Android |
Labels | n/a |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2013-02-17T09:42:56.000+0000 |
Updated | 2017-03-09T01:22:16.000+0000 |
Description
In Android, when a property is set to null, we need to define default behavior for each property.
var label = Ti.UI.createLabel({
text: 'hi',
//html: null,
color: null,
highlightedColor: null,
font: null,
textAlign: null,
verticalAlign: null,
ellipzise: null,
wordWrap: null,
autoLink: null,
layout: null,
size: null,
left: null,
top: null,
center: null,
right: null,
bottom: null,
transform: null,
backgroundColor: null
});
var image = Ti.UI.createImageView({
width: null,
height: null,
images: null,
canScale: null,
image: null,
defaultImage: null
});
var win = Ti.UI.createWindow();
win.add(label);
win.open();
1.Run code, app shouldn't crash, you should see the text 'hi'
PR: https://github.com/appcelerator/titanium_mobile/pull/3892
Closing ticket as fixed.