[TIMOB-18821] Parity: RGBA warns on iOS and is not supported on Android
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Trivial |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2016-04-22T05:23:24.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.4.0 |
| Components | Android, iOS |
| Labels | parity |
| Reporter | Rene Pot |
| Assignee | Srikanth Sombhatla |
| Created | 2015-04-10T15:53:13.000+0000 |
| Updated | 2016-04-22T05:23:24.000+0000 |
Description
Currently RGBA is supported on iOS, although it does give a warning. (Hex color passed looks invalid: rgba(30,30,30,0.5)).
However, currently on Android it doesn't work. However, Android itself actually does support RGBA, but the other way around (ARGB). So support for it could be build properly so it works cross platform: http://developer.android.com/guide/topics/resources/more-resources.html#Color
PR: https://github.com/appcelerator/titanium_mobile/pull/7955
Thanks for the PR [~michael]. [~ssombhatla] can you review? and make sure the older ARGB is deprecated not removed?
[~michael] Do you have a sample app.js I can refer to verify functionality? That will be helpful.
!http://migaweb.de/rgba.png!var win = $.UI.create("Window", { backgroundColor: "#000" }); var view_all = $.UI.create("View", { layout: "horizontal" }); var view_bg = $.UI.create("View", { height: 2, left: 0, right: 0, top: 20, backgroundColor: "white" }); var view1 = $.UI.create("View", { backgroundColor: "#f00", width: 50, height: 50 }); var view1 = $.UI.create("View", { backgroundColor: "rgb(0, 255, 0)", width: 50, height: 50 }); var view2 = $.UI.create("View", { backgroundColor: "rgba(0, 0 ,255, 128)", width: 50, height: 50 }); var view3 = $.UI.create("View", { backgroundColor: "rgba(0,0 ,255 , 0.3 )", width: 50, height: 50 }); var view4 = $.UI.create("View", { backgroundColor: "rgba(0,235,255,128)", width: 50, height: 50 }); var view5 = $.UI.create("View", { backgroundColor: "rgba(0.4,0.4,0.4,0.4)", width: 50, height: 50 }); win.add(view_bg); win.add(view_all); view_all.add(view1); view_all.add(view2); view_all.add(view3); view_all.add(view4); view_all.add(view5); win.open();