Back to project page DVBViewerController.
The source code is released under:
Apache License
If you think the Android project DVBViewerController 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 de.bennir.DVBViewerController.epg; //from w w w . ja v a 2 s . co m import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.ArrayList; import de.bennir.DVBViewerController.R; public class EPGInfoAdapter extends ArrayAdapter<EPGInfo> { private static final String TAG = EPGInfoAdapter.class.toString(); private Context mContext; private ArrayList<EPGInfo> mEPGInfo; static class EPGInfoViewHolder { TextView title; TextView date; TextView time; } public EPGInfoAdapter(Context context, ArrayList<EPGInfo> epgInfo) { super(context, R.layout.epg_list_item, epgInfo); mContext = context; mEPGInfo = epgInfo; } @Override public View getView(int position, View view, ViewGroup parent) { EPGInfoViewHolder viewHolder; if(view == null) { viewHolder = new EPGInfoViewHolder(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.epg_list_item, parent, false); viewHolder.title = (TextView) view.findViewById(R.id.epg_title); view.setTag(viewHolder); } else { viewHolder = (EPGInfoViewHolder) view.getTag(); } viewHolder.title.setText(mEPGInfo.get(position).title); return view; } }