@@ -0,0 +1,2249 @@
+package com.example.georgekaraolanis.project7_booklistingapp;%0A%0Aimport android.content.Context;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.ImageView;%0Aimport android.widget.TextView;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A%0Apublic class BookAdapter extends ArrayAdapter%3CBook%3E %7B%0A%0A    /*Constructor*/%0A    public BookAdapter(Context context,List%3CBook%3E books)%7B%0A        super(context,0,books);%0A    %7D%0A%0A    @Override%0A    public View getView(int position, View convertView, ViewGroup parent)%7B%0A%0A        /*Get view and check if it is being reused*/%0A        View listItemView = convertView;%0A        if (listItemView == null)%7B%0A            listItemView = LayoutInflater.from(getContext()).inflate(%0A            R.layout.list_item,parent,false);%0A        %7D%0A%0A        /*Get book at specified position*/%0A        Book currentBook = getItem(position);%0A%0A        /*Get references to views*/%0A        ImageView thumbnail = (ImageView) listItemView.findViewById(R.id.thumbnail);%0A        TextView titleTextView = (TextView) listItemView.findViewById(R.id.title);%0A        TextView authorsTextView = (TextView) listItemView.findViewById(R.id.authors);%0A%0A        /*Set data in those views*/%0A        thumbnail.setImageBitmap(currentBook.getThumbnail());%0A        titleTextView.setText(currentBook.getTitle());%0A%0A        /*Because a book can have multiple authors, they will be separated with commas*/%0A        ArrayList%3CString%3E authors = currentBook.getAuthors();%0A        int numAuthors = authors.size();%0A%0A        /*If there is one author display his name, else process their names*/%0A        if(numAuthors == 1)%7B%0A            authorsTextView.setText(authors.get(0));%0A        %7D%0A        else%7B%0A%0A            /*First author name is used to initialize StringBuilder*/%0A            StringBuilder authorsText = new StringBuilder(authors.get(0));%0A%0A            /*Start from second author*/%0A            for(int i = 1; i %3C numAuthors; i++)%7B%0A                authorsText.append(%22, %22 + authors.get(i));%0A            %7D%0A%0A            /*When finished set text in TextView*/%0A            authorsTextView.setText(authorsText.toString());%0A%0A        %7D%0A%0A%0A%0A        return listItemView;%0A    %7D%0A%0A%7D%0A

Add ArrayAdapter for Book objects