Back to project page StoichiometryForDummies.
The source code is released under:
GNU Lesser General Public License
If you think the Android project StoichiometryForDummies listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.noahl98.perGProject; /* w w w .jav a2s . c o m*/ import java.util.ArrayList; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; public class FontAdapter extends ArrayAdapter<String>{ private final Context context; private final List<String> values; //used for changing the font of the items on the ToC public FontAdapter(Context context, ArrayList<String> values){ super(context, R.layout.menu_item, values); this.context=context; this.values=values; } @Override public View getView(int position, View convertView, ViewGroup parent){ LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(R.layout.menu_item, parent, false); TextView textView =(TextView) rowView.findViewById(R.id.label); textView.setText(values.get(position).toString()); textView.setTypeface(LauncherMenu.stoneBird); return rowView; } }