In Android development, there’s no getting around learning how to correctly implement your own ListView adapter. A quick google search will teach you how to quickly spin up an ArrayAdapter, but usually devs tend to just roll their own extension of BaseAdapter.
In order to be efficient with the override of getView()
, avoiding calls to findViewById()
becomes necessary (findViewById is a relatively expensive call). This is where the ViewHolder pattern comes in. Google’s own docs expand on usage of the ViewHolder pattern, but for the last few years I’ve drifted towards taking a different approach.