Back to project page swazam.
The source code is released under:
MIT License
If you think the Android project swazam 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 at.saws2013.szazam.ui; // ww w . j a v a2 s . c om 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 at.saws2013.szazam.entities.IListItem; import at.saws2013.szazam.entities.ListItemTypes; /** * Custom ArrayAdapter to be used within the HistoryActivity * to display either requests or transactions, could also be * used to display both * * @author Ren? * */ public class CustomListAdapter extends ArrayAdapter<IListItem> { private LayoutInflater inflater; public CustomListAdapter(Context context, int resource, List<IListItem> objects) { super(context, resource, objects); inflater = LayoutInflater.from(context); } @Override public View getView(int position, View convertView, ViewGroup parent) { return getItem(position).getView(inflater, convertView, parent); } @Override public int getViewTypeCount() { return ListItemTypes.values().length; } @Override public int getItemViewType(int position) { return getItem(position).getViewType(); } }