Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24531] Android: Fix exitOnClose behaviour #8906

Merged
merged 1 commit into from Mar 24, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Mar 24, 2017

  • Fix onBackPressed and exitOnClose behaviour
TEST CASE
var win = Ti.UI.createWindow({title: 'WINDOW #1', backgroundColor: 'gray', layout: 'vertical',
        //exitOnClose: false // SEND TO BACKGROUND
    }),
    a = Ti.UI.createButton({title: 'CREATE NORMAL WINDOW'}),
    b = Ti.UI.createButton({title: 'CREATE exitOnClose WINDOW'});

a.addEventListener('click', function() {
	var win = Ti.UI.createWindow({title: 'WINDOW #2', backgroundColor: 'red'}),
	    lbl = Ti.UI.createLabel({text: 'PRESS BACK - GO TO WINDOW #1'});
	win.add(lbl);
	win.open();
});

b.addEventListener('click', function() {
	var win = Ti.UI.createWindow({title: 'WINDOW #2', backgroundColor: 'blue', exitOnClose: true}),
	    lbl = Ti.UI.createLabel({text: 'PRESS BACK - EXIT'});
	win.add(lbl);
	win.open();
});

win.add(a);
win.add(b);
win.open();

JIRA Ticket

Copy link
Contributor

@antw12 antw12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR & FR PASS 👍

@lokeshchdhry
Copy link
Contributor

FR Passed.

Window is closed only when exitOnClose is set to true & not otherwise. Which was not the case before this fix.
Checked using the sample code.
Also checked by opening a number of windows with exitOnClose property true & false & it works as expected.

Appc Studio : 4.8.1.201612050850
SDK Version : 6.1.0 locally built
Mac OS Version : 10.12.3
Xcode Version : Xcode 8.2.1 Build version 8C1002
Appc CLI AND Appc NPM : {"NPM":"4.2.8","CLI":"6.1.0"}
Ti CLI : 5.0.11
Alloy : 1.9.5
Node : v4.6.0
Devices: Nexus 6 android 6.0.1, Pixel android 7.1
Emulator: Android 4.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants