@@ -0,0 +1,1999 @@
+package com.averi.worldscribe.adapters;%0A%0Aimport android.content.Context;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.TextView;%0A%0Aimport com.averi.worldscribe.R;%0Aimport com.averi.worldscribe.utilities.AttributeGetter;%0A%0A/**%0A * Created by mark on 15/08/16.%0A * Adapter for the Select App Theme spinner.%0A */%0Apublic class AppThemeArrayAdapter extends ArrayAdapter%3CInteger%3E %7B%0A    private LayoutInflater inflater;%0A    private Integer%5B%5D themes;%0A%0A    /**%0A     * Initialize a new AppThemeArrayAdapter.%0A     * @param context The Context using this Adapter.%0A     * @param themes The IDs of the theme resources this Adapter will contain.%0A     */%0A    public AppThemeArrayAdapter(Context context, Integer%5B%5D themes) %7B%0A        super(context, R.layout.theme_list_item, themes);%0A%0A        inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );%0A        this.themes = themes;%0A    %7D%0A%0A    @Override%0A    public View getDropDownView(int position, View convertView, ViewGroup parent) %7B%0A        return getItemViewForTheme(position);%0A    %7D%0A%0A    @Override%0A    public View getView(int position, View convertView, ViewGroup parent) %7B%0A        return getItemViewForTheme(position);%0A    %7D%0A%0A    /**%0A     * Creates a spinner item View for a specific app theme.%0A     * @param position The list index of the app theme to create the View for.%0A     * @return A View representing the specified theme.%0A     */%0A    private View getItemViewForTheme(int position) %7B%0A        int themeID = themes%5Bposition%5D;%0A%0A        View itemLayout = inflater.inflate(R.layout.theme_list_item, null);%0A        TextView itemView = (TextView) itemLayout.findViewById(R.id.text);%0A        itemView.setBackgroundColor(AttributeGetter.getColorAttribute(getContext(), themeID,%0A                R.attr.colorPrimary));%0A        itemView.setText(AttributeGetter.getStyleName(getContext(), themeID));%0A%0A        return itemLayout;%0A    %7D%0A%0A%7D%0A

Create AppThemeArrayAdapter