Mariano Kamp wrote:
> public View getView(int position, View convertView, ViewGroup parent) {
> View rowView = convertView != null ? convertView : activity
> .findViewById(R.layout.entry_row);
Why are you attempting to use a single row View for every entry in the
list? In other words, why is the activity.findViewById() in there?
> Entry entry = entries.get(position);
> --> slow version
> EntryViewHelper.populateEntryView(rowView, entry);
> <--
> -- OR --
> --> (somewhat) fast version
> TextView entryTitleView = (TextView)
> rowView.findViewById(R.id.entry_title);
> TextView feedTitleView = (TextView)
> rowView.findViewById(R.id.feed_title);
>
>
> feedTitleView.setText(entry.getFeedTitle());
> entryTitleView.setText(entry.getTitle());
> <--
You might consider using a ViewHolder or ViewWrapper pattern here. Check
out my Fancy ListViews blog post series on AndroidGuys for more:
http://androidguys.com/?s=fancy+listviews
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---