Project: titanium
Issue TIMOB-17480: Android: Android menuItem with actionView can't handle invalidateOptionsMenu()
Android menuItem with actionView can’t handle invalidateOptionsMenu() with Titanium SDK 3.3.0.GA. h5. TESTING ENVIRONMENT: Mac OS X 10.9 Ti CLI 3.3.0 Titanium SDK: 3.3.0.RC, 3.3.0.GA and 3.2.3.GA Android emulator and device 4.4.3 h5. TEST CODE {code} var searchView = Ti.UI.Android.createSearchView(); var win = Ti.UI.createWindow({	backgroundColor : 'blue',	fullscreen : false,	activity : {	onCreateOptionsMenu : function(e) {	var menu = e.menu;	var menuItem = menu.add({	actionView : searchView,	icon : Ti.Android.R.drawable.ic_menu_search,	showAsAction : Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW	});	menuItem.addEventListener("click", function(e) {	Ti.API.info("I was clicked");	});	}	} }); var data = []; data[0] = Ti.UI.createTableViewRow({	hasChild : true,	title : 'Row 1' }); data[1] = Ti.UI.createTableViewRow({	hasDetail : true,	title : 'Row 2' }); data[2] = Ti.UI.createTableViewRow({	hasCheck : true,	title : 'Row 3' }); data[3] = Ti.UI.createTableViewRow({	title : 'Row 4' }); var tableview = Titanium.UI.createTableView({	data : data,	search : searchView,	searchAsChild : false }); tableview.addEventListener('click', function(e) {	// event data	win.getActivity().invalidateOptionsMenu();	var index = e.index;	var section = e.section;	var row = e.row;	var rowdata = e.rowData;	Titanium.UI.createAlertDialog({	title : 'Table View',	message : 'row ' + row + ' index ' + index + ' section ' + section + ' row data ' + rowdata	}).show(); }); win.add(tableview); win.open(); {code} h5. STEPS TO TEST •	Create a new project •	Update app.js file with sample code •	Run on android emulator/device •	Click the search button, see the searchView appear and works fine. •	Click a row, see the alert (win.getActivity().invalidateOptionsMenu(); i called) •	Click the search button again, now the searchView is not displayed h5. EXPECTED RESULT It’s not working as expected in Ti SDK 3.3.0 but works fine in 3.2.3.GA
Story points: 8