I program and handle with ViewHolder but When I type ViewHolder holder; it’s get an error. when I type ViewHolder and use Ctrl + Space it doesn’t show like we type View and User Ctrl + Space. I use ADT 20.0.3
Why eclipse doesn’t show ViewHolder?
Well, maybe because
ViewHolderis not included into android library and just used like a pattern forAdapterViews classes, especially?Update:
Unfortunately you found the code snippet which just illustrates using of
ViewHolderwithout specification of this class. It’s content depends on your list item content. For example, if yourListViewhas list items withTextViewandImageViewelements, so yourViewHoldershould looks like this:It is declared inside your custom adapter class and very efficient for acceleration of
ListViewscrolling, because during creating of the next list item – when you use not nullconvertView– you may refer toconvertViews content throughViewHolderwhich is usually is the tag ofconvertView.