summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-08-02 23:00:01 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-08-02 23:00:01 +0200
commit941154704b8d6576d2868ab216a906469e841ecb (patch)
tree48bbe06912da8aa10f0ce7fa7ffb47eaf53423f1 /src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java
parentc084d172de38b46f510f1dd500e9dfd659d57982 (diff)
downloadAntennaPod-941154704b8d6576d2868ab216a906469e841ecb.zip
Replaced 'miro' in filenames with 'miroguide'
Diffstat (limited to 'src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java')
-rw-r--r--src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java b/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java
new file mode 100644
index 000000000..1249b7905
--- /dev/null
+++ b/src/de/danoeh/antennapod/adapter/MiroGuideChannelListAdapter.java
@@ -0,0 +1,57 @@
+package de.danoeh.antennapod.adapter;
+
+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.ImageView;
+import android.widget.TextView;
+import de.danoeh.antennapod.R;
+import de.danoeh.antennapod.miroguide.model.MiroChannel;
+
+public class MiroGuideChannelListAdapter extends ArrayAdapter<MiroChannel> {
+
+ public MiroGuideChannelListAdapter(Context context, int textViewResourceId,
+ List<MiroChannel> objects) {
+ super(context, textViewResourceId, objects);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ Holder holder;
+ MiroChannel channel = getItem(position);
+
+ // Inflate Layout
+ if (convertView == null) {
+ holder = new Holder();
+ LayoutInflater inflater = (LayoutInflater) getContext()
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+ convertView = inflater.inflate(R.layout.miroguide_channellist_item, null);
+ holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
+ holder.cover = (ImageView) convertView
+ .findViewById(R.id.imgvChannelimage);
+
+
+ convertView.setTag(holder);
+ } else {
+ holder = (Holder) convertView.getTag();
+ }
+
+ holder.cover.setVisibility(View.GONE);
+ holder.title.setText(channel.getName());
+
+ return convertView;
+ }
+
+ static class Holder {
+ ImageView cover;
+ TextView title;
+ }
+
+
+
+}