3

Hi I am currently developing a mobile application within Flashbuilder 4.5 Pro. However I am having issues as I cannot seem to add a drop down list to my application and have it work properly. I have created the code below and this effectively creates a drop down list and populates it with items, however when the user clicks on an item it is not selected in the field.

This also happens when I am testing it on my machine and the only way to select the item is to click on the list and then use the down arrow on the keyboard which I cannot do in the application. Can someone please help me????

<s:DropDownList id="sex_drpdown" width="150" height="61.35" labelField="value" fontSize="30" change="sex_drpdown_changeHandler(event)">
            <s:ArrayCollection>
                <fx:String>Male</fx:String>
                <fx:String>Female</fx:String>                       
            </s:ArrayCollection>
        </s:DropDownList>
user723858
  • 1,017
  • 3
  • 23
  • 45
  • I'm not sure I understand your issue."when the user clicks on an item it is not selected in the field." => What field? – J_A_X May 12 '11 at 12:57

5 Answers5

3

Although I'm coming in a little late to this question, we have created a Flex Mobile DropDownList and it is available as part of the Flextras Mobile Component set.

The issues w/ using the DropDownList in mobile relate to the differences between touch and mouse inputs and the way that the original DropDownList was structured.

Here is a sample of our Flex Mobile DropDownList. You can always download our free edition to test it out in the mobile emulators or on your device. The free edition can be used in production, but we do have pay options if you want source code or help.


Update: All Flextras Components went open source under the Apache License; so you no longer have to pay anything to use them.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
1

I think what you really want is to use Combobox:

<s:ComboBox change="changeHandler()">
   <s:ArrayCollection>
      <fx:String>Male</fx:String>
      <fx:String>Female</fx:String>                       
   </s:ArrayCollection>
</s:ComboBox>
J_A_X
  • 12,857
  • 1
  • 25
  • 31
  • I noticed combobox is not recommended for flex mobile, instead the available items are now (4.6) lists, callouts. I need a proper dropdown list. Any suggestions for alternatives? – bonCodigo Oct 31 '14 at 04:46
1

Actually there is not an issue with the DropDownList. As a mobile application - user just need to create his own skin for it. Adobe "discourage" it because it requires some advanced skills, which is not the prime target nowdays of Adobe ( which is wried ). Just create your own skin, and it will be more than OK. :)

Yordan Yanakiev
  • 2,546
  • 3
  • 39
  • 88
  • 1
    This isn't completely accurate. The Flex (4.5) DropDownList, as is, has issues with touch inputs; and it is impossible to scroll without extending or modifying code. For our Mobile port we had to extend and modify to get a working implementation. – JeffryHouser Dec 05 '12 at 01:50
0

DropDownList are not made for mobile application

Snote
  • 955
  • 3
  • 19
  • 36
  • ...what are you talking about? – J_A_X May 12 '11 at 13:01
  • Adobe discourages using DropDownList when targeting profiles mobileDevice. The same for ComboBox – Snote May 12 '11 at 13:11
  • You have any links to this? First I've ever heard of it. And even then, it's not to say they're "not made for mobile". They're not optimized for it, but it's not to say they won't work. – J_A_X May 12 '11 at 13:14
  • In Flash Builder when you type in DropDownList, the autocompletion says 'not mobile-optimized' and in the doc it's "Adobe discourages using DropDownList when targeting profiles mobileDevice". When I try the DropDownList I had the same problem than user723858, when I click on it the list open but I couldn't select any item of the list. With the preview version I could select an item by I couldn't scroll (it crashed) if their was to many items in the list – Snote May 12 '11 at 13:30
  • This seems like a stupid thing to be missing from their framework for mobile applications as these elements are really useful, any suggestions on what i could use instead? – user723858 May 12 '11 at 14:24
  • What I did it to put a button. When I click on it, I add a popup with a list an 2 buttons. When I click on a item of the list I set the label of the button with the item selected and I remove the popup. The two button in the popup are to cancel and to set no selected item – Snote May 12 '11 at 14:34
0

We also tried to use a dropDownList on flex mobile, but i doesn't work for it.

Our solution was to make a list pop up instead. This is also used in many android apps and even an adobe sample app: http://www.adobe.com/devnet/flex/samples/sales-dashboard-application.html
resolves the problem that way.

Gjalt
  • 36
  • 2