Project: titanium
Issue TIMOB-19199: Android: Picker in ActionBar shown expanded on app launch with SDK 4.0.1, 4.1.0.GA
In our app, we have a picker added to the ActionBar with code like the following. Building with the 3.5.x branch SDKs, the picker is collapsed as expected. Building the same project with SDK 4.1.0.GA (or 4.0.1), the picker is expanded as shown in the attached graphic when the app is launched. Users have to tap outside the picker to collapse it. {code} $.tabGroup.addEventListener("open", function () { var activity = $.tabGroup.getActivity(); activity.onCreateOptionsMenu = function (e) { var settings, item, picker, menu, data = []; menu = e.menu; menu.clear(); picker = Ti.UI.createPicker(); data.push( Ti.UI.createPickerRow({ title: 'Live', value: 'live' })); data.push( Ti.UI.createPickerRow({ title: 'Ended', value: 'buyingended' })); picker.add(data); picker.addEventListener('change', pickLiveEnded); item = menu.add({ title: "Live", showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS }); item.actionView = picker; picker.setSelectedRow(0, Alloy.Globals.selectedAuctionsPickerRow, false); // column, row, [animated] settings = menu.add({ icon: '/images/gear.png', showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS }); settings.addEventListener('click', function () { Alloy.createController('account').getView().open({ modal: true }); }); }; activity.invalidateOptionsMenu(); }); {code} Edit: I added a graphic showing how it's supposed to look on launch, with picker collapsed. (I deleted the app name & icon from this new graphic.)
Story points: 3