I dont use convertView parametr and return new child-view. Each cell has an animation. In the getView I generate an array of animations, wich I start when the adapter stops his work ( e.g. when my mAnimCounter == 102 ( but need be max 100, lol ) When I run app, all 100 cells are animated. But when I re-check the field as I need and call mGameGrid.setAdapter(mAdapter), new animations working, but last. Last cell are NOT animated. Problem can be only in getView and method how it works. I very doubt that it's not a bug of GridView or Adapter.
On 27 апр, 18:59, Streets Of Boston <[email protected]> wrote: > The child/item-views in list-views and grid-views are re-used > (convertView input parameter). I suspect that depending on the layout/ > measurements/visibility of the child-views and the way you implement > getView (re-using convertView or ignoring it and returning a brand-new > child-view every time), the order in which these child-views are > called (value of 'position' parameter in the getView method) can be > random. > > On Apr 27, 11:30 am, Illidane <[email protected]> wrote: > > > > > Why number of getView calls is different?? > > One time it's 102 ( but need to be 100 ) and the second and greater is > > 101. > > > On 27 апр, 18:15, Romain Guy <[email protected]> wrote: > > > > It's not a bug. There's no guarantee in the order of the calls wrt to > > > the position value. It also depends on how the GridView is > > > measured/laid out. > > > > On Mon, Apr 27, 2009 at 6:38 AM, Illidane <[email protected]> wrote: > > > > > Hi, > > > > I'm using GridView in my app, and myAdapter ( extends BaseAdapter) for > > > > it. I have overrited method getView(int position, View convertView, > > > > ViewGroup parent) of Adapter and 100 cells in GridView. > > > > > If I set logger: > > > > android.util.Log.w("bla", (new StringBuilder()).append > > > > (position).toString()); where is in the getView then I'll see that > > > > position is changed like: 0, 0, 1, 2, 3... 99, 0. -WTF? ( thats for > > > > the first time) and then I call mGameGrid.setAdapter(mAdapter) and > > > > position is going: 0, 0, 1, 2, 3...99. > > > > I think it's a bug of BaseAdapter, isn't it? > > > > -- > > > Romain Guy > > > Android framework engineer > > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time > > > to provide private support. All such questions should be posted on > > > public forums, where I and others can see and answer them- Hide quoted > > > text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

