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-17729] Android: Add CanceledOnTouchOutside property to Titanium.U... #6531

Merged
merged 1 commit into from Jan 7, 2015

Conversation

ashcoding
Copy link
Contributor

...I.Android.ProgressIndicator

Jira: https://jira.appcelerator.org/browse/TIMOB-17729

@ashcoding
Copy link
Contributor Author

Ti.UI.backgroundColor = 'white';

var win = Ti.UI.createWindow({
    backgroundColor : 'blue'
});

var button = Ti.UI.createButton({
    title : 'Show Progress Dialog'
});

var progressIndicator = Ti.UI.Android.createProgressIndicator({
    message : 'Loading...',
    location : Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
    type : Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,
    cancelable : true,
    canceledOnTouchOutside : false,
    min : 0,
    max : 10,
    value : 0
});

button.addEventListener('click', function(e) {
    progressIndicator.show();
    var value = 0;
    setInterval(function() {
        if (value > 10) {
            return;
        }
        progressIndicator.value = value;
        value++;
    }, 200);

});

win.add(button);
win.open();

@@ -120,6 +120,11 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
progressDialog.setCancelable(TiConvert.toBoolean(newValue));
}

} else if (key.equals(TiC.PROPERTY_CANCELED_ON_TOUCH_OUTSIDE)) {
if (progressDialog != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can merge these ifs

@hieupham007
Copy link
Contributor

Functionally tested. Looks good, just a few comments

@ashcoding
Copy link
Contributor Author

Addressed comments.

@hieupham007
Copy link
Contributor

Looks good. Merging

hieupham007 added a commit that referenced this pull request Jan 7, 2015
[TIMOB-17729] Android: Add CanceledOnTouchOutside property to Titanium.U...
@hieupham007 hieupham007 merged commit 96c9ce1 into tidev:master Jan 7, 2015
@ashcoding ashcoding deleted the TIMOB-17729 branch May 21, 2015 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants