Hi Alexey, Try calling notifyDataSetIvalidated before repopulating your adapter and/or notifyDataSetChanged after.
Cheers, Horia On Feb 12, 7:12 am, Alexey <[email protected]> wrote: > Ok everything is being called correctly with setSelection. However in > my case i'm not getting callback because i'm at item 0 in the gallery. > Then i'm adding a view to the adapter, to the top and try to set a > selection. And it doesn't trigger callback, because, i think , from > gallery point of view nothing get changed, we're still at position 0. > I'm not sure how to get around this yet . > > On Feb 11, 5:02 pm, Alexey <[email protected]> wrote: > > > Hi i have a gallery created from code and it has > > OnItemSelectedListener . > > I set selected item from the code by mGallery.setSelection(idx); > > and expect a callback into my onItemSelected > > But it't doesn't happen - how i can trigger onItemSelected to get hit > > from code ? > > > thanks Alex > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

