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): keep Tab tintColor when changing icons #14080

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jul 12, 2024

Fixes #14079

var tabs = [];
function createTab(title, icon) {
	const window = Ti.UI.createWindow({ title: title });
	window.add(Ti.UI.createLabel({ text: title + " View" }));
	const tab = Ti.UI.createTab({
		title: title,
		icon: icon,
		window: window,
	});
	tabs.push(tab);
	return tab;
}

const tabGroup = Ti.UI.createTabGroup({
	tabs: [
		createTab("Tab 1", "/images/appicon.png"),
		createTab("Tab 2", "/images/appicon.png"),
		createTab("Tab 3", "/images/appicon.png")
	],
	activeTintColor: "red",
	activeTitleColor: "red",
	tintColor: "purple",
	titleColor: "purple",
	tabsBackgroundColor: "#F7F7F7",
});

setTimeout(function(){
	tabs[0].icon = "/images/appicon.png"
	tabGroup.activeTintColor = "red"
},1000)

tabGroup.open();

before this PR:

Unbenannt.mp4

Red icon will lose activeTintColor.

After the PR:
icon stays red

@hansemannn hansemannn merged commit 51be366 into master Aug 20, 2024
5 checks passed
@hansemannn hansemannn deleted the androidTabTint branch August 20, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: TabGroup icon tint color resets when changing the icon
2 participants