Shaimailit wrote: > Hi, > thanks for the reply. > I would like to enable no selection in the spinner itself (like > windows combobox style), without using other controls, like checkbox. > I forgot to mention an important issue: I am using the > SimpleCursorAdapter, which means I get the values from DB table. > Therefore, I prefer to manipulate the spinner itself, instead of > adding fictive record to DB. > Is that possible?
Not easily. Here are some ideas: You could try subclassing SQLiteCursor to create one that returns your "fictive" record along with the actual database query results. Then, you would need your own CursorFactory class to use the Cursor class you just created. Then you would need to use methods on SQLiteDatabase that let you supply the CursorFactory to use (e.g., rawQueryWithFactory()). That would let you introduce a "(no selection)" value to the Spinner without putting it in the database. You could try subclassing Spinner to add a "(no selection)" choice along with whatever the Cursor provides in terms of data. You could get by with one of my earlier suggestions and hope that the behavior you really want gets added to Android in some future release. Hope this helps! -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch in September! http://www.bignerdranch.com --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

