And you think it's not a bug? where is guarantee that it will work in
general?
Where adapter takes it's magic number N?

On 27 апр, 19:56, Romain Guy <romain...@google.com> wrote:
> There is no guarantee it's going to be called N times either.
>
> 2009/4/27 Illidane <illid...@gmail.com>:
>
>
>
>
>
>
>
> > Even with convertView problem is still same - last cell is not
> > animating.
> > And... you said WHEN getView()... I think it's no matter, matter HOW
> > MANY times getView() called.
> > It calls more than 100 times, whats very strange.
> > For the first time it's called 102 times and all animations was
> > working. For the second and next times it was 101, and last animation
> > was static.
> > I think where is some bug regularity...
>
> > On 27 апр, 19:31, Romain Guy <romain...@google.com> wrote:
> >> You should ALWAYS reuse the convertView, oherwise you're gonna eat up
> >> memory and just slow down your app. And like I said, there is no
> >> guarantee on how and when getView() is called so you cannot rely on it
> >> with your anim counter.
>
> >> 2009/4/27 Illidane <illid...@gmail.com>:
>
> >> > 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 <flyingdutc...@gmail.com> 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 <illid...@gmail.com> 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 <romain...@google.com> 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 <illid...@gmail.com> 
> >> >> > > 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
> >> >> > > romain...@android.com
>
> >> >> > > 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 -
>
> >> --
> >> Romain Guy
> >> Android framework engineer
> >> romain...@android.com
>
> >> 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
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to