Ugh, so this was difficult, but I found a solution:
Code:
Ext.application({
name: 'swipeTest',
//change the default recognisers
eventPublishers: {
touchGesture: {
recognizers: {
swipe: {
//this will include both vertical and horizontal swipe recognisers
xclass: 'Ext.event.recognizer.Swipe'
}
}
}
},
launch: function() {
Ext.create('Ext.Panel', {
fullscreen: true,
scrollable: true,
html: 'This is a Panel',
items: [{
xtype: 'titlebar',
docked: 'top',
title: 'Panel'
},{
xtype: 'button',
text: 'Swipe on button supported',
name: 'myButton',
id: 'myButtony'
}],
listeners: {
initialize: function(comp , eOpts){
var btn = comp.down( "button" );
btn.element.on(
'swipe',
function(event, node, options, eOpts) {
Ext.Msg.alert('swipe', 'direction: '+event.direction, Ext.emptyFn);
},
comp
);
}
}
});
}
});