summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2014-06-07 13:16:52 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2014-06-07 13:16:52 +0200
commit2629c9ee22ad5bb47c001f25c098267de7964262 (patch)
tree993b2bc6c2cc29ac628df28ab755c545138a716e
parent7220c65ef424116b322b85e92a90bdfd419c59bf (diff)
downloadAntennaPod-2629c9ee22ad5bb47c001f25c098267de7964262.zip
Removed unused files
-rw-r--r--res/layout/feedlist_item.xml129
-rw-r--r--res/layout/feedlist_item_grid.xml138
-rw-r--r--res/values-large/refs.xml5
-rw-r--r--src/de/danoeh/antennapod/adapter/FeedlistAdapter.java174
4 files changed, 0 insertions, 446 deletions
diff --git a/res/layout/feedlist_item.xml b/res/layout/feedlist_item.xml
deleted file mode 100644
index f6c43675d..000000000
--- a/res/layout/feedlist_item.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingRight="8dp" >
-
- <ImageView
- android:id="@+id/imgvFeedimage"
- android:contentDescription="@string/cover_label"
- android:layout_width="@dimen/thumbnail_length"
- android:layout_height="@dimen/thumbnail_length"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="4dip"
- android:adjustViewBounds="true"
- android:cropToPadding="true"
- android:scaleType="fitXY" />
-
- <LinearLayout
- android:id="@+id/lEpisodeCounts"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:orientation="vertical" >
-
- <RelativeLayout
- android:id="@+id/lNewStatusLabel"
- android:contentDescription="@string/new_episodes_count_label"
- android:layout_width="@dimen/status_indicator_width"
- android:layout_height="0dip"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="4dp"
- android:layout_weight="1"
- android:background="@color/status_unread" >
-
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="4dp"
- android:src="@drawable/white_circle"
- tools:ignore="ContentDescription"/>
-
- <TextView
- android:id="@+id/txtvNewEps"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="4dp"
- android:layout_marginRight="8dp"
- android:maxLines="1"
- android:minEms="2"
- android:textColor="@color/white"
- android:textSize="@dimen/text_size_micro"
- android:textStyle="bold" />
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/lProgressStatusLabel"
- android:contentDescription="@string/in_progress_episodes_count_label"
- android:layout_width="@dimen/status_indicator_width"
- android:layout_height="0dip"
- android:layout_marginBottom="8dp"
- android:layout_weight="1"
- android:background="@color/ics_gray" >
-
- <TextView
- android:id="@+id/txtvProgressEps"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:background="@color/status_progress"
- android:maxLines="1"
- android:minEms="2"
- android:paddingLeft="4dp"
- android:textColor="@color/white"
- android:textSize="@dimen/text_size_micro"
- android:textStyle="bold" />
-
- <ImageView
- android:layout_width="10dp"
- android:layout_height="8dp"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="2dp"
- android:layout_marginLeft="2dp"
- android:src="@drawable/av_play_dark"
- tools:ignore="ContentDescription"/>
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@id/lEpisodeCounts"
- android:layout_toRightOf="@id/imgvFeedimage"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/txtvFeedname"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:maxLines="1"
- android:textColor="?android:attr/textColorPrimary"
- android:textSize="@dimen/text_size_small" />
-
- <TextView
- android:id="@+id/txtvNumEpisodes"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="@dimen/text_size_micro" />
-
- <TextView
- android:id="@+id/txtvLastUpdate"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="?android:attr/textColorSecondary"
- android:textSize="@dimen/text_size_micro" />
- </LinearLayout>
-
-</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/feedlist_item_grid.xml b/res/layout/feedlist_item_grid.xml
deleted file mode 100644
index 934904374..000000000
--- a/res/layout/feedlist_item_grid.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
-
- <ImageView
- android:id="@+id/imgvFeedimage"
- android:contentDescription="@string/cover_label"
- android:layout_width="@dimen/thumbnail_length"
- android:layout_height="@dimen/thumbnail_length"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_margin="8dp"
- android:adjustViewBounds="true"
- android:cropToPadding="true"
- android:scaleType="fitXY"/>
-
- <LinearLayout
- android:id="@+id/lEpisodeCounts"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignRight="@id/imgvFeedimage"
- android:layout_below="@id/imgvFeedimage"
- android:layout_centerVertical="true"
- android:orientation="vertical">
-
- <RelativeLayout
- android:id="@+id/lNewStatusLabel"
- android:contentDescription="@string/new_episodes_count_label"
- android:layout_width="@dimen/status_indicator_width"
- android:layout_height="0dip"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="4dp"
- android:layout_weight="1"
- android:background="@color/status_unread">
-
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="4dp"
- android:src="@drawable/white_circle"
- tools:ignore="ContentDescription"/>
-
- <TextView
- android:id="@+id/txtvNewEps"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="4dp"
- android:layout_marginRight="8dp"
- android:maxLines="1"
- android:minEms="2"
- android:textColor="@color/white"
- android:textSize="@dimen/text_size_micro"
- android:textStyle="bold"/>
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/lProgressStatusLabel"
- android:contentDescription="@string/in_progress_episodes_count_label"
- android:layout_width="@dimen/status_indicator_width"
- android:layout_height="0dip"
- android:layout_marginBottom="8dp"
- android:layout_weight="1"
- android:background="@color/ics_gray">
-
- <TextView
- android:id="@+id/txtvProgressEps"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:background="@color/status_progress"
- android:maxLines="1"
- android:minEms="2"
- android:paddingLeft="4dp"
- android:textColor="@color/white"
- android:textSize="@dimen/text_size_micro"
- android:textStyle="bold"/>
-
- <ImageView
- android:layout_width="10dp"
- android:layout_height="8dp"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp"
- android:src="@drawable/av_play_dark"
- tools:ignore="ContentDescription"/>
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@id/imgvFeedimage"
- android:layout_below="@id/imgvFeedimage"
- android:layout_toLeftOf="@id/lEpisodeCounts"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/txtvFeedname"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginRight="8dp"
- android:ellipsize="end"
- android:lines="1"
- android:textSize="@dimen/text_size_small"
- android:textColor="?android:attr/textColorPrimary"
- android:textStyle="bold"/>
-
- <TextView
- android:id="@+id/txtvLastUpdate"
- android:lines="2"
- android:ellipsize="end"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="@dimen/text_size_micro"
- android:textColor="?android:attr/textColorTertiary"/>
-
- <TextView
- android:id="@+id/txtvNumEpisodes"
- android:lines="1"
- android:ellipsize="end"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginRight="8dp"
- android:textSize="@dimen/text_size_micro"
- android:textColor="?android:attr/textColorTertiary"/>
- </LinearLayout>
-
-</RelativeLayout> \ No newline at end of file
diff --git a/res/values-large/refs.xml b/res/values-large/refs.xml
deleted file mode 100644
index 7caac382f..000000000
--- a/res/values-large/refs.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <item type="layout" name="feedlist_item">@layout/feedlist_item_grid</item>
-
-</resources> \ No newline at end of file
diff --git a/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java b/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java
deleted file mode 100644
index 30c1ff880..000000000
--- a/src/de/danoeh/antennapod/adapter/FeedlistAdapter.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package de.danoeh.antennapod.adapter;
-
-import android.content.Context;
-import android.text.format.DateUtils;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-import de.danoeh.antennapod.R;
-import de.danoeh.antennapod.asynctask.ImageLoader;
-import de.danoeh.antennapod.feed.Feed;
-import de.danoeh.antennapod.storage.DownloadRequester;
-import de.danoeh.antennapod.storage.FeedItemStatistics;
-import de.danoeh.antennapod.util.ThemeUtils;
-
-public class FeedlistAdapter extends BaseAdapter {
- private static final String TAG = "FeedlistAdapter";
-
- private Context context;
- protected ItemAccess itemAccess;
-
- private int selectedItemIndex;
- private ImageLoader imageLoader;
- public static final int SELECTION_NONE = -1;
-
- public FeedlistAdapter(Context context, ItemAccess itemAccess) {
- super();
- if (context == null) {
- throw new IllegalArgumentException("context must not be null");
- }
- if (itemAccess == null) {
- throw new IllegalArgumentException("itemAccess must not be null");
- }
-
- this.context = context;
- this.itemAccess = itemAccess;
- selectedItemIndex = SELECTION_NONE;
- imageLoader = ImageLoader.getInstance();
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- final Holder holder;
- final Feed feed = getItem(position);
- final FeedItemStatistics feedItemStatistics = itemAccess.getFeedItemStatistics(position);
-
- // Inflate Layout
- if (convertView == null) {
- holder = new Holder();
- LayoutInflater inflater = (LayoutInflater) context
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
- convertView = inflater.inflate(R.layout.feedlist_item, null);
- holder.title = (TextView) convertView
- .findViewById(R.id.txtvFeedname);
-
- holder.newEpisodes = (TextView) convertView
- .findViewById(R.id.txtvNewEps);
- holder.inProgressEpisodes = (TextView) convertView
- .findViewById(R.id.txtvProgressEps);
- holder.newEpisodesLabel = (View) convertView
- .findViewById(R.id.lNewStatusLabel);
- holder.inProgressEpisodesLabel = (View) convertView
- .findViewById(R.id.lProgressStatusLabel);
- holder.image = (ImageView) convertView
- .findViewById(R.id.imgvFeedimage);
- holder.lastUpdate = (TextView) convertView
- .findViewById(R.id.txtvLastUpdate);
- holder.numberOfEpisodes = (TextView) convertView
- .findViewById(R.id.txtvNumEpisodes);
- convertView.setTag(holder);
- } else {
- holder = (Holder) convertView.getTag();
-
- }
-
- if (position == selectedItemIndex) {
- convertView.setBackgroundColor(convertView.getResources().getColor(
- ThemeUtils.getSelectionBackgroundColor()));
- } else {
- convertView.setBackgroundResource(0);
- }
-
- holder.title.setText(feed.getTitle());
-
- if (feedItemStatistics != null) {
- if (DownloadRequester.getInstance().isDownloadingFile(feed)) {
- holder.lastUpdate.setText(R.string.refreshing_label);
- } else {
- if (feedItemStatistics.lastUpdateKnown()) {
- holder.lastUpdate.setText(convertView.getResources().getString(
- R.string.most_recent_prefix)
- + DateUtils.getRelativeTimeSpanString(
- feedItemStatistics.getLastUpdate().getTime(),
- System.currentTimeMillis(), 0, 0));
- } else {
- holder.lastUpdate.setText("");
- }
- }
- holder.numberOfEpisodes.setText(feedItemStatistics.getNumberOfItems()
- + convertView.getResources()
- .getString(R.string.episodes_suffix));
-
- if (feedItemStatistics.getNumberOfNewItems() > 0) {
- holder.newEpisodes.setText(Integer.toString(feedItemStatistics.getNumberOfNewItems()));
- holder.newEpisodesLabel.setVisibility(View.VISIBLE);
- } else {
- holder.newEpisodesLabel.setVisibility(View.INVISIBLE);
- }
-
- if (feedItemStatistics.getNumberOfInProgressItems() > 0) {
- holder.inProgressEpisodes
- .setText(Integer.toString(feedItemStatistics.getNumberOfInProgressItems()));
- holder.inProgressEpisodesLabel.setVisibility(View.VISIBLE);
- } else {
- holder.inProgressEpisodesLabel.setVisibility(View.INVISIBLE);
- }
- }
- final String imageUrl = (feed.getImage() != null && feed.getImage().isDownloaded()) ? feed.getImage()
- .getFile_url() : null;
- imageLoader.loadThumbnailBitmap(
- feed.getImage(),
- holder.image,
- (int) convertView.getResources().getDimension(
- R.dimen.thumbnail_length));
-
- return convertView;
- }
-
- static class Holder {
- TextView title;
- TextView lastUpdate;
- TextView numberOfEpisodes;
- TextView newEpisodes;
- TextView inProgressEpisodes;
- ImageView image;
- View newEpisodesLabel;
- View inProgressEpisodesLabel;
- }
-
- public int getSelectedItemIndex() {
- return selectedItemIndex;
- }
-
- public void setSelectedItemIndex(int selectedItemIndex) {
- this.selectedItemIndex = selectedItemIndex;
- notifyDataSetChanged();
- }
-
- @Override
- public int getCount() {
- return itemAccess.getCount();
- }
-
- @Override
- public Feed getItem(int position) {
- return itemAccess.getItem(position);
- }
-
- @Override
- public long getItemId(int position) {
- return position;
- }
-
- public interface ItemAccess {
- int getCount();
-
- Feed getItem(int position);
-
- FeedItemStatistics getFeedItemStatistics(int position);
- }
-}