I have a huge listview , with more then 100,000 items. What I did now..
PostPaid accountItem = (PostPaid)arr.get(position);
ViewHolder holder;
if (convertView == null) {
LayoutInflater mInflater = (LayoutInflater)
context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
convertView = mInflater.inflate(R.layout.list_support_item20, null);
holder = new ViewHolder();
holder.text = (TextView) convertView.findViewById(R.id.accountType);
convertView.setTag(holder);
}
else {
holder = (ViewHolder) convertView.getTag();
}
holder.text.setText(accountItem.getTitle());
What I did originally
LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
convertView = mInflater.inflate(R.layout.list_support_item, null);
TextView accountType = (TextView) convertView.findViewById(R.id.accountType);
accountType.setText(accountItem.getTitle());
I want to ask about the differences between two, and which on preferable? And how can I improve performance even more. I am testing on kitat nexus and works perfectly in both cases, but am trying to figure out gingerbread issues