1

How do we create a drop down menu in android which is not focusable when we select an item from drop down list?

Previously I created a drop-down menu which is combo box. Everytime I selected an item from drop down list, the drop down menu is focusable. It shouldn't. Which is fixed by changing it to Option menu. I got an advice from this thread Combo box not focusable

Now, the problem is, Option menu doesn't work in android. It works perfectly on IOS only.

Note: I am developing using Livecode.

Community
  • 1
  • 1
JunM
  • 7,040
  • 7
  • 37
  • 58

2 Answers2

1

Spinners are available in LC:

http://forums.runrev.com/phpBB2/viewtopic.php?f=53&t=14543

But they may be overkill for your needs. Have you thought about using a set of grouped buttons? Combined with a "move" command you can add the animation.

Simon

Simon
  • 11
  • 1
  • Thanks Simon. I'll read this link, seems I can learn a lot of stuffs from this. By the way, I made a workaround of my problem by combining a button and a scrolling list field. I followed it from this link: http://forums.runrev.com/viewtopic.php?t=8531&p=40865. – JunM Aug 16 '13 at 04:14
  • @JunM If Simon's answer is useful, please make sure to click on the "accept" button next to the answer! – Mark Aug 19 '13 at 09:07
1

You're not supposed to use menu buttons on mobile devices. It is bad GUI design.

This is an example for Android:

global gCurrentSelectedValue

on mouseUp
  put "One,Two,Three,Four,Five,Size,Seve,Eight,Nine,Then" into myOptionList
  put 4 into gCurrentSelectedValue // sometimes you need more lines for this
  mobilePick myOptionList,gCurrentSelectedValue,"checkmark","cancelDone"
  put the result into rslt
  if rslt > 0 then
    put rslt into gCurrentSelectedValue
    // do something with gCurrentSelectedValue
  end if
end mouseUp
Mark
  • 2,380
  • 11
  • 29
  • 49
  • Thank you Mark. Since it is a bad GUI design, what should be the best thing/approach I should use for my drop down list? – JunM Aug 19 '13 at 09:46
  • What I posted here in my answer is the only right way to do it. – Mark Aug 19 '13 at 09:55
  • I like your idea. I tested it by adding your code on a button. I'll modify this one to my need. – JunM Aug 19 '13 at 09:55
  • So, if you like it, click on the "Accept" button. – Mark Aug 19 '13 at 09:56
  • 1
    Thank you for the help. Sorry, It took time for me to realize how could I implement your answer. – JunM Aug 19 '13 at 09:58
  • Hi Mark..What if i want to populate this option menu with database values? Means data will come from the database column. – Rohit Bhardwaj Aug 26 '13 at 06:15
  • Rohit, I would have to write a script here and that's not very convenient. You'r better ask a new question and post the link here. – Mark Aug 26 '13 at 19:45
  • In my case, I am also pulling from database for my menu. What I did is, I query the menu from database and store the result to `myOptionList`. – JunM Aug 30 '13 at 03:54