Hi, I'm having the same problem. Did you find any solutions??
-Mika On Jun 24, 7:39 pm, jabu <jabu.j...@gmail.com> wrote: > Hi Everyone, > > I am implementing my ownadapterthat inherits from BaseAdapter (this > is something very classic). > Then when I start the activity that owns the listView binded to thisadapterI > can see that the getView() method is called moretimesthan > what the number of view actually available in the list. > For instance, I do have 2 rows in my list and when I first set > theadaptergetView is called 6times. Then If I make a call to > notifyDataSetChanged(), getView is called 4times. > I understand that when you scroll up and down getView must be called > to generate or re use a view but I don't scroll up or down, I am > really wondering why getView is called so many time. > > Thanks a lot in advance for your responses. > Jabu > > My code just in case even though it is a pretty basic piece of code: > > public View getView(int position, View convertView, ViewGroup > parent) > { > ViewHolder holder; > if (convertView == null) > { > convertView = mInflater.inflate(R.layout.row_action, > null); > // Creates a view holder > holder = new ViewHolder(); > ... > convertView.setTag(holder); > } > else > { > holder = (ViewHolder)convertView.getTag(); > } > holder.params.set.... > return convertView; > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---