1. Download our Official Android App: Forums for Android!

Apps Possible to close spinner by code?

Discussion in 'Android Development' started by Maxxan, Aug 22, 2010.

  1. Maxxan

    Maxxan Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    7
    Joined:
    Aug 19, 2010

    Aug 19, 2010
    7
    0
    5
    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...