我正在尝试使用ActionSheet向用户展示几个选项以继续。我想在屏幕中间添加一个简单的文本框来向用户描述问题。
有没有一个简单/标准的方式来在Sencha-Touch中提供这样的提示?sencha-touch using ActionSheet
0
A
回答
2
你需要做这样的事情在你的覆盖...
if (!this.popup) {
this.popup = new Ext.Panel({
hideOnMaskTap: false,
floating: true,
modal: true,
centered: true,
hideOnMaskTap: false,
width: 300,
height: 200,
styleHtmlContent: true,
scroll: 'vertical',
html: '<p>msg here</p>'
});
}
this.popup.show('pop');
这里的关键是hideOnMaskTap: false
,这将防止叠加的,当你点击它的遮盖区域消失。
然后,您可以显示您的操作表,但是您必须记住隐藏操作表按钮的处理程序中的覆盖图,因为当您在蒙版区域点击时不会消失。
if (!this.actions) {
this.actions = new Ext.ActionSheet({
items: [{
text: 'decline',
ui: 'decline',
handler: function() {
this.doWhateverYouNeedToDo();
this.actions.hide();
this.popup.hide();
}
}, {
text: 'save',
handler: function() {
this.doWhateverYouNeedToDo();
this.actions.hide();
this.popup.hide();
}
}, {
text: 'cancel',
scope: this,
handler: function() {
this.doWhateverYouNeedToDo();
this.actions.hide();
this.popup.hide();
}
}]
});
}
this.actions.show();
记在纸张处理叠加的隐藏..(我不这样做上述但你更可能要摧毁覆盖和动作片,他们都隐藏后也只是以保持潮流)
0
您可以使用Overlay弹出窗口在ActionSheet呈现后显示消息。
+0
我尝试使用覆盖,但它偷走了ActionSheet的焦点,当我第一次点击其中一个按钮时,叠加层消失,并且点击处理程序未被调用,直到第二次点击。 –
相关问题
- 1. SenchaTouch onItemDisclosure
- 2. ActionSheet滞后
- 3. Javascript summming arrays using using d3.nest()
- 4. SenchaTouch:动态绑定商店
- 5. 视口内的SenchaTouch ListView?
- 6. iOS获取ActionSheet-Like按钮
- 7. UIAlertController - 默认覆盖ActionSheet?
- 8. 的iOS 8 ActionSheet颜色
- 9. ActionSheet?视图?不确定
- 10. 编程ActionSheet的按钮
- 11. Swift中的ActionSheet操作
- 12. Using Intent.putextra
- 13. using System.Reflection
- 14. using System.Windows.Forms.Datagrid
- 15. using num.toFixed();
- 16. using setChildIndex();
- 17. using requestAnimationFrame
- 18. SenchaTouch:停靠<img>布局中断
- 19. NoMethodError using activerecord_postgis_adapter
- 20. using System.Linq;在.NET
- 21. Google Picker using Scala.js
- 22. Php preg_replace()using
- 23. SELECT USING UNION QUERY
- 24. zend headtitle using zend_navigation
- 25. Polymer:Help using dom-if
- 26. LEFT JOIN using OR
- 27. error:parse xml using java
- 28. NSRangeException using - [ALAssetsGroup enumerateAssetsUsingBlock:]
- 29. .Net Logger using DLL's
- 30. Window.showModalDialog()using javascript
谢谢,那正是我一直在寻找的。 –
谢谢..我投票了 –