You may have tried
Docked: 'right'
Then the right side is not correct.
You may have tried
Right: '0%'
Top '123'
Ugly
You may have tried
Align: 'right'
Sorry, the button does not have this attribute.
So... The answer is:
Items: [{xtype: 'call', UI: 'mask', iconcls: 'refresh', Handler: refresh}, {xtype: 'spacer'}, {xtype: 'button ', UI: 'mask', iconcls: 'add', Handler: refresh}]
Add a space.
Just to explain the reason behind this. in sencha touch, toolbars are nothing more than containers with an hbox layout and custom styling. so in order to alter the alignment, the pack and other hbox layout configuration you coshould do:
Code:
Layout: {Pack: 'justify ', align: 'center' // align center is the default}
This also means that you can set the property "flex" on every item inside a toolbar to have them take up the remaining space.
Finally I Just Wanted To paste the code for the spacer class to show you what it does.
Code:
Ext. spacer = ext. Extend (ext. component, {initcomponent: function () {If (! This. width) {This. Flex = 1 ;}ext. spacer. superclass. initcomponent. Call (this );}});
As you can see you can give a spacer a fixed width, and if you dont do that it will use a flex of one. this means that if you use the following order of items in your Toolbar [Button, spacer, button, spacer, button], you will get a button on the left, one in the center and one on the right with the spacers both taking up an equal amount of space.
I hope this answered your question.