[TIMOB-11855] Android: Ti.App.Properties change event should support Ti.UI.Android.openPreferences
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | n/a |
| Reporter | Martin Guillon |
| Assignee | Unknown |
| Created | 2012-10-21T15:36:11.000+0000 |
| Updated | 2018-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();
pull request https://github.com/appcelerator/titanium_mobile/pull/3309
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();i dont see how i can add an attachment to this bug. it seems i cant anymore :s