@@ -0,0 +1,2147 @@
+package com.andela.currencycalculator.adapter;%0A%0Aimport android.app.Activity;%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 com.andela.currencycalculator.R;%0Aimport com.andela.currencycalculator.model.helper.SpinnerCurrency;%0A%0Aimport java.util.ArrayList;%0A%0A/**%0A * Created by Spykins on 25/02/2016.%0A */%0Apublic class SpinnerAdapter extends ArrayAdapter%3CSpinnerCurrency%3E %7B%0A    private ArrayList%3CSpinnerCurrency%3E spinnerCurrencies;%0A    private int groupId;%0A    private Context context;%0A%0A    public SpinnerAdapter(Context context, int resource, int textViewResourceId, ArrayList%3CSpinnerCurrency%3E objects) %7B%0A        super(context, resource, textViewResourceId, objects);%0A        this.spinnerCurrencies = objects;%0A        this.groupId = resource;%0A        this.context = context;%0A    %7D%0A%0A    public View getView(int position, View view, ViewGroup parent)%7B%0A        SpinnerViewHolder spinnerViewHolder;%0A%0A        if(view == null)%7B%0A            spinnerViewHolder = new SpinnerViewHolder();%0A            LayoutInflater inflater = ((Activity) context).getLayoutInflater();%0A            view = inflater.inflate(groupId,parent,false);%0A            spinnerViewHolder.imageView = (ImageView) view.findViewById(R.id.spinnerImageView);%0A            spinnerViewHolder.textView = (TextView)view.findViewById(R.id.spinnerCodeView);%0A            view.setTag(spinnerViewHolder);%0A        %7D else %7B%0A            spinnerViewHolder = (SpinnerViewHolder) view.getTag();%0A        %7D%0A%0A        if (spinnerCurrencies.get(position) != null)%7B%0A            spinnerViewHolder.imageView.setImageResource(spinnerCurrencies.get(position).getImageId());%0A            spinnerViewHolder.textView.setText(spinnerCurrencies.get(position).getSpinnerCodeText());%0A        %7D%0A%0A        return view;%0A    %7D%0A%0A    public View getDropDownView(int position, View view,ViewGroup parent)%7B%0A        return getView(position,view,parent);%0A    %7D%0A%0A    class SpinnerViewHolder%7B%0A        ImageView imageView;%0A        TextView textView;%0A%0A    %7D%0A%7D%0A

Create the Spinner Adapter class for inflating the Spinner and smooth rendering