[TIMOB-19859] Android: Deprecate Ti.Android.R.drawable
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-11-06T08:53:11.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.4.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Chee Kiat Ng |
| Assignee | Srikanth Sombhatla |
| Created | 2015-11-04T06:59:26.000+0000 |
| Updated | 2016-06-28T20:05:24.000+0000 |
Description
Related to TIMOB-8453, deprecating drawables since this is considered a bad practice by Google.
PR https://github.com/appcelerator/titanium_mobile/pull/7399 To test use the following code. This should write a warning to console.
var win = Ti.UI.createWindow(); var image = Ti.UI.createImageView({ image:Ti.Android.R.drawable.ic_menu_add }); win.add(image); win.open()[~msamah] Updated PR. Please review.
PR merged.
Verified the fix. We see warning as below if
Ti.Android.R.drawableis used:Closing. Environment: Appc Studio : 4.7.0.201606150733 Ti SDK : 5.4.0.v20160617074028 Ti CLI : 5.0.9 Alloy : 1.9.0 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-20 Node: 4.4.4 Nexus 6 - Android 6.0.1