package com.lyrch.openbrew;

import android.app.ListActivity;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.ArrayAdapter;


public class IngredientActivity extends ListActivity {
    private String[] ingredients;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ingredient_layout);

        Context context = getApplicationContext();
        Resources resources = context.getResources();
        ingredients = resources.getStringArray(R.array.ingredient_types);

        ArrayAdapter<String> ingredientsAdapter = new ArrayAdapter<String>(this, R.layout.ingredient_list_layout, ingredients);

        setListAdapter(ingredientsAdapter);
    }

}
@@ -170,27 +170,247 @@
 oid.
-widget.ArrayAdapter
+util.TypedValue;%0Aimport android.view.Gravity;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.widget.BaseAdapter;%0Aimport android.widget.ListAdapter;%0Aimport android.widget.TextView
 ;%0A%0A%0A
@@ -856,164 +856,1157 @@
     
-ArrayAdapter%3CString%3E ingredientsAdapter = new ArrayAdapter%3CString%3E(this, R.layout.ingredient_list_layout, ingredients);%0A%0A        setListAdapter(ingredientsA
+setAdapter();%0A    %7D%0A%0A    private void setAdapter() %7B%0A        ListAdapter adapter = new BaseAdapter() %7B%0A            public int getCount() %7B%0A                return ingredients.length;%0A            %7D%0A%0A            public Object getItem(int position) %7B%0A                return ingredients%5Bposition%5D;%0A            %7D%0A%0A            public long getItemId(int position) %7B%0A                return position;%0A            %7D%0A%0A            @Override%0A            public View getView(int position, View convertView, ViewGroup parent) %7B%0A                LayoutInflater ingredientInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);%0A                View view = ingredientInflater.inflate(R.layout.list_row, null);%0A                TextView ingredientTextView = (TextView) view.findViewById(R.id.TextView01);%0A                ingredientTextView.setText(ingredients%5Bposition%5D);%0A                ingredientTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 35);%0A                ingredientTextView.setGravity(Gravity.CENTER);%0A                ingredientTextView.setTextIsSelectable(false);%0A                return view;%0A            %7D%0A        %7D;%0A        setListAdapter(a
 dapt

Build the Ingredient ListView.