[TIMOB-28575] Android: ActionBar menu item text should not be all-caps by default
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-11-05T18:25:17.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 10.2.0 |
| Components | Android |
| Labels | MenuItem, android, menu, theme |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2021-11-05T01:32:38.000+0000 |
| Updated | 2021-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 Notice
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
| File | Date | Size |
|---|---|---|
| Menu-AllCaps.png | 2021-11-05T01:31:42.000+0000 | 408472 |
| Menu-NotAllCaps.png | 2021-11-05T01:31:42.000+0000 | 409257 |
PR (master): https://github.com/appcelerator/titanium_mobile/pull/13166