Added code to the custom adapter for the list view.