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.channels; /*from w w w .j a va 2 s .c om*/ import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import de.bennir.DVBViewerController.DVBViewerControllerActivity; import de.bennir.DVBViewerController.R; import java.util.ArrayList; public class ChanGroupAdapter extends ArrayAdapter<String> { private final Context context; private final ArrayList<String> values; public ChanGroupAdapter(Context context, ArrayList<String> values) { super(context, R.layout.channels_group_list_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 v; if (convertView != null) v = convertView; else v = inflater.inflate(R.layout.channels_group_list_item, parent, false); TextView chanGroup = (TextView) v.findViewById(R.id.channels_group_list_item); chanGroup.setTypeface(((DVBViewerControllerActivity) context).robotoLight); chanGroup.setText(values.get(position)); return v; } }