hi there, some Spinner is driving me crazzzyyy:
i am using a Spinner layout element bound to a SQLite-Table by a SimpleCursorAdapter. The Spinner so far works fine: it lets me click and select an item and it displays the selected item afterwards in it's compact view. For some features of my app I am also using the Spinner's setSelection(int position) - method to set the spinner's position programmatically. But then I get a strange behavior there: when I select an item by setSelection(int position) the Spinner shows the 1. item in the compact view but the correctly selected item in it's dropdown view. Whenever this happens and the Spinner shows the wrong item, it's getSelected-method returns the correct position that was set before (>0). This behavior does not happen always, it seems that it happens after rebinding data to the Spinner and selecting an item. funny thing is: when i use the setSelection(int position, boolean animate)-method, the Spinner's data behavior is ok and the item- position-bug is gone. All I do is changing the setSelection-method to setSelection(position, false) and compile the app: spinner's data behavior is fine! but then I get some display issues for that same spinner. I just changes a single line of code and the spinner now draws a paddingTop- spacing when it measures it's dimension the first time. after layout is drawn a simple invalidate() will bring the Spinner to it's correct place within the layout. Does anyone know how to get rid of this Spinner-bug? Does anyone know a workaround? It seems to be a framework bug within some of the spinner's methods. the bug occurrs in emulator (tested: 1.5, 2.1, 2.2) and on physical phone HTC hero (android 1.5) and nexus one (android 2.2). thanks a lot! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

