Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11855] Android: Ti.App.Properties change event should support Ti.UI.Android.openPreferences

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMartin Guillon
AssigneeUnknown
Created2012-10-21T15:36:11.000+0000
Updated2018-02-28T20:04:25.000+0000

Description

*Improvement description* Ti.App.Properties.addEventListener('change', onChange); should support Ti.UI.Android.openPreferences *Pull request* See comment. *Test case*
var win = Ti.UI.createWindow({backgroundColor:'white'});
Ti.App.Properties.addEventListener('change', function(){
     alert('property changed');    
});
var button = Ti.UI.createButton({
     width:100,
     height:35,
     title:'click',
     top:10
});
button.addEventListener('click', function(){
     var value = Ti.App.Properties.getInt('testprop');
     value += 1;
     Ti.App.Properties.setInt('testprop', value);   
});
win.add(button);
win.open();

Comments

  1. Martin Guillon 2012-10-21

    pull request https://github.com/appcelerator/titanium_mobile/pull/3309
  2. Martin Guillon 2012-12-08

    new test case to test Ti.UI.Android.openPreferences You ll need the attached preferences.xml
       var win = Ti.UI.createWindow({backgroundColor:'white'});
       Ti.App.Properties.addEventListener('change', function(){
            alert('property changed');    
       });
       var button = Ti.UI.createButton({
            width:100,
            height:35,
            title:'click',
            top:10
       });
       button.addEventListener('click', function(){
             Ti.UI.Android.openPreferences(); 
       });
       win.add(button);
       
       win.open();
       
  3. Martin Guillon 2012-12-08

    i dont see how i can add an attachment to this bug. it seems i cant anymore :s

JSON Source