Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28575] Android: ActionBar menu item text should not be all-caps by default

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-11-05T18:25:17.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.2.0
ComponentsAndroid
LabelsMenuItem, android, menu, theme
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-11-05T01:32:38.000+0000
Updated2021-11-05T18:27:16.000+0000

Description

*Summary:* As of Titanium 10.0.0, we changed our default Titanium theme to not show all-caps button text. We should do the same for menu items shown in the ActionBar for consistency. *Note:* The drop-down overflow menu items are not all-caps. Only the menu items shown in the ActionBar are displayed this way. *Steps to reproduce:*

Build and run the below code on Android.

Notice ActionBar shows "MENU ITEM" in all-caps. _(This is what we want to change.)_

Notice the button text and drop-down menu text is not all-caps. _(This is okay.)_

function showAlertForEvent(e) {
	alert(Clicked on: ${e.source.title});
}

const window = Ti.UI.createWindow();
window.activity.onCreateOptionsMenu = (e) => {
	const menuItem1 = e.menu.add({
		title: "Menu Item",
		showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM,
	});
	menuItem1.addEventListener("click", showAlertForEvent);
	const menuItem2 = e.menu.add({
		title: "Drop-Down Menu Item",
		showAsAction: Ti.Android.SHOW_AS_ACTION_NEVER,
	});
	menuItem2.addEventListener("click", showAlertForEvent);
};
const button = Ti.UI.createButton({ title: "My Button" });
button.addEventListener("click", showAlertForEvent);
window.add(button);
window.open();
*Result:* Notice "MENU ITEM" is in all-caps. !Menu-AllCaps.png|thumbnail! *Expected Result:* We want to change our default Titanium theme to not use all-caps everywhere. !Menu-NotAllCaps.png|thumbnail!

Attachments

FileDateSize
Menu-AllCaps.png2021-11-05T01:31:42.000+0000408472
Menu-NotAllCaps.png2021-11-05T01:31:42.000+0000409257

Comments

  1. Joshua Quick 2021-11-05

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/13166

JSON Source