ViewHolder Pattern
ViewHolder design pattern is used to speed up rendering of your ListView - actually to make it work smoothly, findViewById is quite expensive (it does DOM - Data Object Model parsing) when used each time a list item is rendered, it must traverse our layout hierarchy and also instantiate objects . Since lists can redraw its items quite frequently during scrolling such overhead might be substantial. The ViewHolder pattern is solely to reduce the number of view.findViewById(int) calls we make. The ViewHolder pattern only works when we take advantage of view recycling The ViewHolder design pattern enables you to access each list item view without the need for the look up, saving valuable processor cycles. Specifically, it avoids frequent call of findViewById() during ListView scrolling, and that will make it smooth Without the ViewHolder Design Pattern Okay, let’s dig it out and see how it works without the ViewHolder pattern. Let’s take...