Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): set correct title after titleAttributes update #13957

Merged
merged 7 commits into from Jan 12, 2024

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Dec 26, 2023

Fixes an issue that came with #13954 and window titles. Title where not shown in all (sub)windows:

Test 1:

var win = Titanium.UI.createWindow({
	barColor: "pink",
	backgroundColor: "white",
	title: 'Autos',
	titleAttributes: {
		top: 0,
		color: "blue",
	},
});

win.addEventListener("click", function() {
	win.titleAttributes = {
		color: "yellow"
	}
})
win.open();

open and click

Test 2:

var win = Titanium.UI.createWindow({
	barColor: "pink",
	backgroundColor: "white",
	title: 'Autos',
	titleAttributes: {
		top: 0,
		color: "blue",
	},
});

var navWin = Titanium.UI.createNavigationWindow({
	window: win,
});

win.addEventListener("click", function() {
	win.titleAttributes = {
		color: "yellow"
	}
	win.title = "new"

	var w2 = Ti.UI.createWindow({
		barColor: "black",
		backgroundColor: "white",
		title: 'subwindow',
		titleAttributes: {
			top: 0,
			color: "green",
		},
	})
	navWin.openWindow(w2);
	setTimeout(function() {
		w2.title = "subwindow 2";
	}, 2000);
})
navWin.open();

open and click, wait, close window after title changed.

@m1ga m1ga marked this pull request as ready for review December 26, 2023 17:13
Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

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

2 quick ones left :)

@hansemannn hansemannn merged commit 53738a1 into master Jan 12, 2024
5 checks passed
@hansemannn hansemannn deleted the 231216_fix_android_title branch January 12, 2024 09:19
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.

None yet

2 participants