Skip to content

Use font icons in tabs button navigation #12921

Answered by m1ga
beppo-ivel asked this question in Q&A
Discussion options

You must be logged in to vote

It would be very helpful if you provide some code and a screenshot

I can only show how I create my tab icons:

function generateIcon(icon) {
	var size = (icon.size == undefined) ? 30 : icon.size;
	if (OS_IOS) {
		size /= Ti.Platform.DisplayCaps.logicalDensityFactor;
	}
	var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, icon.filename);
	var lbl = Ti.UI.createLabel({
		text: icon.icon,
		font: {
			fontSize: size - 2,
			fontFamily: "remixicon"
		},
		color: "#888"
	});
	var view = Ti.UI.createView({
		width: size,
		height: size,
	});
	view.add(lbl);
	var img = view.toImage();
	f.write(img);
}

generateIcon({
	filename: 'icon_list.png',
	icon: "\uEEBA"
})

and the I use $…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@m1ga
Comment options

m1ga Jun 28, 2021
Collaborator

@beppo-ivel
Comment options

@m1ga
Comment options

m1ga Jul 5, 2021
Collaborator

@beppo-ivel
Comment options

@m1ga
Comment options

m1ga Jul 18, 2021
Collaborator

Answer selected by beppo-ivel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants