Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 5.0.0
-
Component/s: Android
-
Environment:
CLI 4.0.1
SDK 4.0.1, 4.1.0.GA
-
Story Points:3
-
Sprint:2015 Sprint 16 SDK
Description
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.
$.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();
|
});
|
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.)