package com.manyconf.conference;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import java.util.ArrayList;

/**
 *
 * http://stackoverflow.com/questions/7361135/how-to-change-color-and-font-on-listview
 */
public class ThemedArrayAdapter extends ArrayAdapter {

    public ThemedArrayAdapter(Context context, int textViewResourceId, Object[] objects) {
        super(context, textViewResourceId, objects);
    }

    public ThemedArrayAdapter(Context context, int textViewResourceId, ArrayList objects) {
        super(context, textViewResourceId, objects);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {


        View view = super.getView(position, convertView, parent);

        TextView tv = (TextView) view;
        tv.setTypeface(Theme.current().regularFont);

        return view;
    }
}