[TIMOB-14076] Android: App crashes when properties of the actionBar are changed while the current window/tabGroup has navBarHidden set to true
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2018-12-12T14:31:28.000+0000 |
Affected Version/s | Release 3.1.0, Release 3.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | actionbar |
Reporter | Olmo Kramer |
Assignee | Yordan Banev |
Created | 2013-05-20T19:38:04.000+0000 |
Updated | 2018-12-12T14:31:32.000+0000 |
Description
*Problem*
The app crashes with "Unfortunately, app has stopped." if actionBar properties are changed at runtime while the current window/tabGroup has navBarHidden set to true.
*Test case*
var win = Ti.UI.createTabGroup({
navBarHidden : true
});
tab1 = Ti.UI.createTab({
title : "title1"
});
win1 = Ti.UI.createWindow();
tab1.window = win1;
tab2 = Ti.UI.createTab({
title : "title2"
});
win2 = Ti.UI.createWindow();
tab2.window = win2;
win.addTab(tab1);
win.addTab(tab2);
win.addEventListener("open", function() {
actionBar = win.getActivity().actionBar;
if (actionBar) {
actionBar.setTitle("Test");
}
});
win.open();
Hi Olmo, Please provide a simple reproducible test case that we can drop into an app.js and run to reproduce the crash. Resolving as "Needs more info" until this is provided. Thanks!
I updated the information, with a script i think should crash.
Tested and confirmed on Android 4.1.2 x86 emulator with Ti SDK 3.1 GA and 3.2 CI. However, the app crashes regardless of the navBarHidden property being true or false.
Strange... I re-tested it, and I am able to reproduce my problem with test case above. The app doesn't crash when i set navBarHidden to false, or when i don't set it at all. Only when it is set to true. Also, I forgot to mention that i have set these values in my tiapp.xml manifest:
but values like these are necessary for the actionBar, so probably you also set those values to something like this.
navBarHidden
has been dropped after 3.3.0. Tested with 7.0.0.GA the issue can't be reproduced. Closing as such.