Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17729] Android: Add CanceledOnTouchOutside property to Titanium.UI.Android.ProgressIndicator

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-01-07T22:29:05.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 4.0.0
ComponentsAndroid
LabelsProgressIndicator, TCSupport, android, mobile
ReporterMohammed AL-awadi
AssigneeAshraf Abu
Created2014-08-28T09:57:52.000+0000
Updated2015-09-02T08:35:54.000+0000

Description

i want to use loading dialog in android that is not dismissed when touching outside and use back button to cancel loading operation when using ProgressIndicator and location="Ti.UI.Android.PROGRESS_INDICATOR_DIALOG", it displays loading dialog just fine but when touching anywhere in screen, it dismisses the dialog. Android use CanceledOnTouchOutside = false to prevent this action. Please add CanceledOnTouchOutside or find a solution for this problem

Comments

  1. Mohammed AL-awadi 2014-12-03

    does Affects Version/s: Release 3.4.0 means it supposed to be finished by Release 3.4.0 ?
  2. Ingo Muschenetz 2014-12-03

    This means that it was tested on version 3.4.0. We have not yet assigned a fix version.
  3. Ashraf Abu 2015-01-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/6531
  4. Ashraf Abu 2015-01-05

       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();
       
  5. Khushbu Agrawal 2015-02-18

    Verified with below Test Environment : Appc Studio : 4.0.0.201502111039 Ti SDK : 4.0.0.v20150217154015 Mac OSX : 10.10.1 Alloy : 1.5.1 CLI - 3.6.0-dev Code Processor: 1.1.1 Nexus 5 - Android 5.0 By default, CanceledOnTouchOutside property is set to true. When touching anywhere in screen, it dismisses the dialog. When CanceledOnTouchOutside property is set to false, the dialog is not dismissed when touch anywhere in screen. Working as expected. Closing this ticket.
  6. Mohammed AL-awadi 2015-09-02

    this property isn't documented yet in http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android.ProgressIndicator

JSON Source