[TIMOB-20467] Android: Titanium.UI.ProgressBar 'color' property has no effect on text
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-21T04:12:44.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 5.4.0 |
Components | Android |
Labels | android, defect, parity |
Reporter | Gabriel Mario Aguirre |
Assignee | Srikanth Sombhatla |
Created | 2016-02-24T19:51:51.000+0000 |
Updated | 2016-06-10T21:57:07.000+0000 |
Description
The 'color' property of Titanium.UI.ProgressBar does not effect the text. The text stays "white" and thus invisible to a white background. The 'color' property only effects the color of the bar itself.
In the documentation the color property is described as below:
But changing the color property changes the color of the bar not the text and the text color remains white. In the following code sample color property of the "Titanium.UI.ProgressBar" is set to blue. The bar color then becomes blue but the text color of the message remains while.
*Environment*: *Device info:* Nexux7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.0.v20160220080449 and 5.1.2.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5
Seems that documentation was incorrectly done for this. As per TIMOB-19588, the color property exposed was for the bar.
This is more of a parity issue. please check if we can make android and ios consistent.
PS. the issue here is that 'color' changes the text on iOS. tintColor changes the "filled" color on iOS. 'trackTintColor' changes the color of the 'not filled" portion of the bar. On Android, 'color' changes the bar and not the text. There's no tintColor or trackTintColor property on Android. Looks like tintColor maps to http://developer.android.com/reference/android/widget/ProgressBar.html#attr_android:progressTint and trackTintColor maps to http://developer.android.com/reference/android/widget/ProgressBar.html#attr_android:progressBackgroundTint Ideally color should change the text color on both; tintColor should change the bar (fill) color on both, trackTintColor should change the "unfilled" color of the bar.
PR: https://github.com/appcelerator/titanium_mobile/pull/7953 This PR changes text color with
color
property - which is as per documentation. Can use the following app.js for testingPR merged.
Verified the fix.
color
property now changes the color of the text as well. Closing. Environment: Appc Studio : 4.6.0.201605201934 Ti SDK : 5.4.0.v20160608165242 Ti CLI : 5.0.8 Alloy : 1.8.7 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-11 Node: 4.4.4 Nexus 6 - Android 6.0.0