Project: titanium
Issue TIMOB-16619: Android: LiveView throws errors if action bar is implemented in the app
NOTE : This is seen on post & pre 3.0 android devices & emulators. h5. Description: 1. Create a default & replace the app.js with the sample code for action bar from the docs: {code} var win = Ti.UI.createWindow({ title: "Old Title", navBarHidden: false }); var actionBar; win.addEventListener("open", function() { if (Ti.Platform.osname === "android") { if (! win.activity) { Ti.API.error("Can't access action bar on a lightweight window."); } else { actionBar = win.activity.actionBar; if (actionBar) { actionBar.backgroundImage = "/bg.png"; actionBar.title = "New Title"; actionBar.onHomeIconItemSelected = function() { Ti.API.info("Home icon clicked!"); }; } } } }); win.open(); {code} 2. Build for android device/emulator with live view enabled. h5. Actual Result: 1. We see following error in console: {code} [INFO] : [LiveView] Error Evaluating app.js @ Line: undefined [ERROR] : ReferenceError: actionBar is not defined [ERROR] : File: app.js [ERROR] : Line: undefined [ERROR] : SourceId: undefined [ERROR] : Backtrace: [ERROR] : undefined {code} h5. Expected Result: 1. We should not see any errors & liveview should work successfully.
Story points: 8