Description:
1. Replace the app.js with the following code:
var win = Ti.UI.createWindow({
title: "SplitBar",
navBarHidden: false,
splitActionBar: true
});
win.activity.onCreateOptionsMenu = function(e){
var menu = e.menu;
var menuItem = menu.add({
title: "Item1",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
menu.add({
title: "Item2",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
menu.add({
title: "Item3",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
menu.add({
title: "Item4",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
menu.add({
title: "Item5",
showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM
});
};
win.open();
2. Build for android 2.3.X device/emulator.
Actual Result:
1. The app crashes with following errors:
[ERROR] : TiApplication: (main) [305,305] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: android.view.Window.setUiOptions; Titanium 3.5.0,2014/10/06 03:32,bee9e05
[ERROR] : TiApplication: java.lang.NoSuchMethodError: android.view.Window.setUiOptions
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
[ERROR] : TiApplication: at android.app.ActivityThread.access$1500(ActivityThread.java:117)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:130)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:3691)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:507)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
2. If the application is built with "splitActionBar: false" the app builds & runs fine.
3. My targetSdkVersion in tiapp.xml is set to 19 and for actionbar the min targetSdkVersion should be 14 or higher
Expected Result:
1. The app should not crash & we should be able to see the splitActionBar.
A comment was made by a Titan asking if we were placing
We are not addressing any further Android 2.3 issues in version 4.0, so marking this as "Won't fix"
Closing ticket as the issue will not fix.