[android-developers] How does ListView Internally Works

2012-09-12 Thread Dilip Kumar Chaudhary
I'm little confused about android *listview*,for data bind, we use 
Adapters.As far as i know the* getView()*called according to the length of 
items that we are trying to bind in the listView.So if data length is four 
then *getView()*will be called for times and it binds data in the 
*listview*.Now 
My question is this,i'm trying to print log in *getView()*so when data bind 
this log should print but its not happening,on scrolling * listview* this 
log is being printed.So i'm confused about this * listview*.please suggest 
me.Thanks

-- 
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

Re: [android-developers] How does ListView Internally Works

2012-09-12 Thread TreKing
On Mon, Sep 10, 2012 at 8:03 AM, Dilip Kumar Chaudhary 
androiddili...@gmail.com wrote:

 As far as i know the* getView()*called according to the length of items
 that we are trying to bind in the listView.So if data length is four then
 *getView()*will be called for times and it binds data in the *listview*.


No. If you have 100 items and can only see 5 on the screen, getView() is
not going to be called 100 times, just 5.


 Now My question is this,i'm trying to print log in *getView()*so when
 data bind this log should print but its not happening,on scrolling *listview
 * this log is being printed.So i'm confused about this * listview*.please
 suggest me.Thanks


See above. You're see the log print for the views being actually rendered.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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