Possible to close spinner by code?


Last Updated:

  1. Maxxan

    Maxxan Member This Topic's Starter

    Joined:
    Aug 19, 2010
    Messages:
    7
    Likes Received:
    0
    Hi!
    Iv'e got a spinner with a long click listner on the popup list (created a custom adapter and added a long click listner to each view, since spinner.setOnLongClickListener doesn't seem to do anything).

    The problem is that if I add a long click listner, the spinner list doesn't close when selecting something. (But I can see that it responds to the click, because the radio button becomes orange when clicking.)

    So either:
    1. Can I close the spinner view by code? (I.e. set onClickListener on each view selecting that item and close the spinner list).

    2. Call the default click listener some how? (On the other hand I see that something is happening since the radiobutton gets orange, just that the spinner don't select that item and closes the list).

    3. Why does the default selection behaviour get screwed up when adding a long click listener? Can I stop that?

    What I want is a menu with "Edit item" and "Delete item" when performing a long press.

    Thanks!
     

    Advertisement

Share This Page

Loading...