[TIMOB-28211] iOS: The color property of Ti.UI.Button does not work when used in navbar
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | Release 9.3.0 |
Components | iOS |
Labels | n/a |
Reporter | Satyam Sekhri |
Assignee | Vijay Singh |
Created | 2020-10-28T02:50:47.000+0000 |
Updated | 2020-11-20T16:39:29.000+0000 |
Description
When a button is used in window for leftNavBar or rightNavBar, the color property does not work.
Steps to Reproduce:
1. Create a titanium mobile app using the code below
2. Run on iOS device/sim
3. On the Red Window, click on the button "Open Blue Window"
4. Check the Left and Right navbar buttons in the blue window
Actual Result:
These buttons show the blue text color instead of the color assigned.
Expected Result:
The buttons used in navbar should show the text color assigned as color property.
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win1 = Titanium.UI.createNavigationWindow({
window: win2
});
var lnv = Titanium.UI.createButton({
title: 'Left',
color: 'yellow'
});
lnv.addEventListener('click', function(){
win1.closeWindow(win3, {animated:false});
});
var rightView = Ti.UI.createView();
var rnv = Titanium.UI.createButton({
title: 'Right',
color:'red'
});
rnv.addEventListener('click', function(){
win1.closeWindow(win3, {animated:false});
});
var win3 = Titanium.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window',
leftNavButton:lnv,
rightNavButton:rnv
});
var button = Titanium.UI.createButton({
title: 'Open Blue Window',
color: 'black'
});
button.addEventListener('click', function(){
win1.openWindow(win3, {animated:true});
});
win2.add(button);
var button2 = Titanium.UI.createButton({
title: 'Close Blue Window'
});
button2.addEventListener('click', function(){
win1.closeWindow(win3, {animated:false});
});
win3.add(button2);
win1.open();
In the navbar, instead of using a button, if we use a label with colored text or use a view having a button with colored text shows up fine.
Buttons use the "tintColor" property for coloring.
PR. - https://github.com/appcelerator/titanium_mobile/pull/12245 Test Case -
FR Passed. Waiting for Jenkins build.
merged to master. Backport PR for 9_3_X is merged as well.