Flex Mobile弹出列表窗口

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flex Mobile弹出列表窗口相关的知识,希望对你有一定的参考价值。

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:SkinnablePopUpContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
  3. xmlns:s="library://ns.adobe.com/flex/spark"
  4. backgroundColor="0x898989" width="400">
  5. <s:layout>
  6. <s:VerticalLayout gap="20" paddingBottom="10" paddingLeft="30"
  7. paddingRight="30" paddingTop="30" horizontalAlign="center"/>
  8. </s:layout>
  9. <fx:Script>
  10. <![CDATA[
  11. import mx.collections.ArrayCollection;
  12.  
  13. private var _dataProvider:ArrayCollection;
  14. private var _labelField:String;
  15. private var _allowMultipleSelection:Boolean;
  16. private var _selectedItems:Vector.<Object>;
  17.  
  18. [Bindable]
  19. public function get selectedItems():Vector.<Object> {
  20. return _selectedItems;
  21. }
  22.  
  23. public function set selectedItems(v:Vector.<Object>):void {
  24. _selectedItems = v;
  25. }
  26.  
  27. [Bindable]
  28. public function get allowMultipleSelection():Boolean {
  29. return _allowMultipleSelection;
  30. }
  31.  
  32. public function set allowMultipleSelection(v:Boolean):void {
  33. _allowMultipleSelection = v;
  34. }
  35.  
  36. [Bindable]
  37. public function get labelField():String {
  38. return _labelField;
  39. }
  40.  
  41. public function set labelField(v:String):void {
  42. _labelField = v;
  43. }
  44.  
  45. [Bindable]
  46. public function get dataProvider():ArrayCollection {
  47. return _dataProvider;
  48. }
  49.  
  50. public function set dataProvider(v:ArrayCollection):void {
  51. _dataProvider = v;
  52. }
  53.  
  54. private function onClick(commit:Boolean):void {
  55. super.close(commit, list.selectedItems);
  56. }
  57. ]]>
  58. </fx:Script>
  59.  
  60. <s:Label text="Select an item:" width="100%"/>
  61.  
  62. <s:List id="list" width="100%" height="100%"
  63. dataProvider="{dataProvider}"
  64. labelField="{labelField}"
  65. allowMultipleSelection="{allowMultipleSelection}"
  66. selectedItems="{selectedItems}"/>
  67.  
  68. <s:HGroup width="100%">
  69. <s:Button label="OK" width="50%" click="onClick(true)"/>
  70. <s:Button label="Cancel" width="50%" click="onClick(false)"/>
  71. </s:HGroup>
  72.  
  73. </s:SkinnablePopUpContainer>

以上是关于Flex Mobile弹出列表窗口的主要内容,如果未能解决你的问题,请参考以下文章

如何在 jQuery Mobile 中等待弹出窗口关闭?

jQuery Mobile - 多个弹出窗口问题

如何从第一个弹出窗口中打开第二个 jquery-mobile 弹出窗口

jQuery mobile:关闭弹出窗口后隐藏虚拟键盘

可拖动的非模态弹出窗口 Jquery Mobile

在jquery mobile中使用一个按钮关闭和打开弹出窗口