Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14076] Android: App crashes when properties of the actionBar are changed while the current window/tabGroup has navBarHidden set to true

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2018-12-12T14:31:28.000+0000
Affected Version/sRelease 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsactionbar
ReporterOlmo Kramer
AssigneeYordan Banev
Created2013-05-20T19:38:04.000+0000
Updated2018-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();

Comments

  1. Daniel Sefton 2013-05-20

    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!
  2. Olmo Kramer 2013-05-20

    I updated the information, with a script i think should crash.
  3. Daniel Sefton 2013-05-31

    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.
  4. Olmo Kramer 2013-06-01

    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:
    <manifest>
           <tool-api-level>16</tool-api-level>
           <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="16" />
       </manifest>
    but values like these are necessary for the actionBar, so probably you also set those values to something like this.
  5. Yordan Banev 2018-10-05

    navBarHidden has been dropped after 3.3.0. Tested with 7.0.0.GA the issue can't be reproduced. Closing as such.

JSON Source