PDA

View Full Version : ActionSheet as a child of another component?



benjamind
28 Oct 2011, 6:47 AM
Hi,

I've tried to create an ActionSheet that is contained within another component. Now I couldn't work out how to do this at creation time, since I only want the sheet in a child view that may or may not be displayed in the lifetime of the app. So I decided I would add the sheet to the component after creating it with an add and doLayout call. This mostly seems to work when inside a normal web browser, but when run on my Android device the ActionSheets mask does not correctly display. Most times it will not display the mask in the correct position. If I show/hide the ActionSheet quickly then sometimes the mask appears correctly. I have been having a very hard time debugging this on device, I've tried to use Weinre but whenever I add the script tag to the index.html the app refuses to load.

Anyone have any ideas what I'm doing wrong?



this.sortSheet = new Ext.ActionSheet({
enter: 'top',
id: 'mySortSheet',
items: [{xtype: 'panel', html:'Test text'},{
text: 'Action 1'
},{
text: 'Action 2'
},{
text: 'Action 3'
}]
});

app.views.main.add(this.sortSheet);
app.views.main.doLayout();