Skip to content

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jul 14, 2025

Android:
Add navBarColor property to change the navigation bar color using code. Since we use navBarHidden I've used the same name with color at the end instead of navigationBarColor.

Screenshot_20250714-091225

Current way:
Set the color in your theme.

Example code:

Normal Window:

var win = Ti.UI.createWindow({
	navBarColor:"#0f0"
});
setTimeout(function(){
	win.navBarColor = "#f00";
},2000)

win.open();

NavigationWindow:

var win2 = Titanium.UI.createWindow({
		navBarColor:"#0f0"
});

var win1 = Titanium.UI.createNavigationWindow({
    window: win2
});

var win3 = Titanium.UI.createWindow({
		navBarColor:"#f00"
});

var button = Titanium.UI.createButton({
    title: 'Open Window'
});
button.addEventListener('click', function(){
    win1.openWindow(win3, {animated:true});
});

win2.add(button);
var button2 = Titanium.UI.createButton({
    title: 'Close Window'
});
button2.addEventListener('click', function(){
    win1.closeWindow(win3, {animated:false}); 
});

win3.add(button2);
win1.open();

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR's, but didn't test. LGTM!

@prashantsaini1
Copy link
Contributor

Good to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants