Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18593] Android: MenuItem's applyProperties doesn't work

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsAndroid
LabelsActionBar, Menuitem
ReporterFokke Zandbergen
AssigneeUnknown
Created2015-02-19T10:02:09.000+0000
Updated2018-02-28T19:55:49.000+0000

Description

The following example shows that setting a MenuItem title via applyProperties doesn't work, while setting it on creation or via the property or its setter does work. The applyProperties is listed in documentation as being available for Android for this proxy.
var win = Ti.UI.createWindow({
  fullscreen: true
});

win.activity.onCreateOptionsMenu = function(e){
  var menu = e.menu;
  var menuItem = menu.add({ 
    title: "On create", 
    showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS
  });
  menuItem.applyProperties({
    title: 'via applyProperties'
  });
  // menuItem.title = 'via property';
  // menuItem.setTitle('via setter');
};

win.open();

Comments

No comments

JSON Source