From 74dd13484874f4dc66a443b20777ddca007b8e5f Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sun, 27 Jan 2013 19:40:09 +0100 Subject: [PATCH] Removed unused classes --- res/values/ids.xml | 2 - .../antennapod/activity/MainActivity.java | 2 - .../adapter/ExternalFeedItemlistAdapter.java | 80 ------------------- .../antennapod/fragment/QueueFragment.java | 78 ------------------ .../fragment/UnreadItemlistFragment.java | 78 ------------------ 5 files changed, 240 deletions(-) delete mode 100644 src/de/danoeh/antennapod/adapter/ExternalFeedItemlistAdapter.java delete mode 100644 src/de/danoeh/antennapod/fragment/QueueFragment.java delete mode 100644 src/de/danoeh/antennapod/fragment/UnreadItemlistFragment.java diff --git a/res/values/ids.xml b/res/values/ids.xml index c3219b553..2b107e7dd 100644 --- a/res/values/ids.xml +++ b/res/values/ids.xml @@ -2,8 +2,6 @@ - - diff --git a/src/de/danoeh/antennapod/activity/MainActivity.java b/src/de/danoeh/antennapod/activity/MainActivity.java index cae342fb3..67d7424b6 100644 --- a/src/de/danoeh/antennapod/activity/MainActivity.java +++ b/src/de/danoeh/antennapod/activity/MainActivity.java @@ -26,8 +26,6 @@ import de.danoeh.antennapod.feed.FeedManager; import de.danoeh.antennapod.fragment.EpisodesFragment; import de.danoeh.antennapod.fragment.ExternalPlayerFragment; import de.danoeh.antennapod.fragment.FeedlistFragment; -import de.danoeh.antennapod.fragment.QueueFragment; -import de.danoeh.antennapod.fragment.UnreadItemlistFragment; import de.danoeh.antennapod.service.PlaybackService; import de.danoeh.antennapod.service.download.DownloadService; import de.danoeh.antennapod.storage.DownloadRequester; diff --git a/src/de/danoeh/antennapod/adapter/ExternalFeedItemlistAdapter.java b/src/de/danoeh/antennapod/adapter/ExternalFeedItemlistAdapter.java deleted file mode 100644 index 7917be827..000000000 --- a/src/de/danoeh/antennapod/adapter/ExternalFeedItemlistAdapter.java +++ /dev/null @@ -1,80 +0,0 @@ -package de.danoeh.antennapod.adapter; - -import java.util.List; - -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.TextView; -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.asynctask.FeedImageLoader; -import de.danoeh.antennapod.feed.FeedItem; - -/** - * Array adapter that should be used to display a list of FeedItems from several - * different feeds. - */ -public class ExternalFeedItemlistAdapter extends AbstractFeedItemlistAdapter { - - ActionButtonCallback callback; - - public ExternalFeedItemlistAdapter(Context context, int textViewResourceId, - List objects, - ActionButtonCallback callback) { - super(context, textViewResourceId, objects); - this.callback = callback; - } - - @Override - public View getView(final int position, View convertView, ViewGroup parent) { - Holder holder; - FeedItem item = getItem(position); - - if (convertView == null) { - holder = new Holder(); - LayoutInflater inflater = (LayoutInflater) getContext() - .getSystemService(Context.LAYOUT_INFLATER_SERVICE); - convertView = inflater.inflate(R.layout.external_itemlist_item, null); - holder.title = (TextView) convertView - .findViewById(R.id.txtvTitle); - holder.feedImage = (ImageView) convertView - .findViewById(R.id.imgvFeedimage); - holder.butAction = (ImageButton) convertView - .findViewById(R.id.butAction); - convertView.setTag(holder); - } else { - holder = (Holder) convertView.getTag(); - } - - holder.title.setText(item.getTitle()); - holder.feedImage.setTag(item.getFeed().getImage()); - FeedImageLoader.getInstance().loadThumbnailBitmap( - item.getFeed().getImage(), - holder.feedImage, - (int) convertView.getResources().getDimension( - R.dimen.thumbnail_length)); - holder.butAction.setFocusable(false); - holder.butAction.setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View v) { - //callback.onActionButtonPressed(position); - } - }); - - return convertView; - - } - - static class Holder { - TextView title; - ImageView feedImage; - ImageButton butAction; - } - - -} diff --git a/src/de/danoeh/antennapod/fragment/QueueFragment.java b/src/de/danoeh/antennapod/fragment/QueueFragment.java deleted file mode 100644 index b234959e4..000000000 --- a/src/de/danoeh/antennapod/fragment/QueueFragment.java +++ /dev/null @@ -1,78 +0,0 @@ -package de.danoeh.antennapod.fragment; - -import android.os.Bundle; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.TextView; - -import com.actionbarsherlock.view.ActionMode; -import com.actionbarsherlock.view.Menu; -import com.actionbarsherlock.view.MenuInflater; -import com.actionbarsherlock.view.MenuItem; - -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.adapter.AbstractFeedItemlistAdapter; -import de.danoeh.antennapod.adapter.ExternalFeedItemlistAdapter; -import de.danoeh.antennapod.adapter.FeedItemlistAdapter; -import de.danoeh.antennapod.feed.FeedManager; - -public class QueueFragment extends ItemlistFragment { - private static final String TAG = "QueueFragment"; - - public QueueFragment() { - super(FeedManager.getInstance().getQueue(), true); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setHasOptionsMenu(true); - } - - protected AbstractFeedItemlistAdapter createListAdapter() { - return new ExternalFeedItemlistAdapter(getActivity(), 0, items, - adapterCallback); - } - - @Override - public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - super.onCreateOptionsMenu(menu, inflater); - menu.add(Menu.NONE, R.id.clear_queue_item, Menu.NONE, getActivity() - .getString(R.string.clear_queue_label)); - menu.add(Menu.NONE, R.id.download_all_item, Menu.NONE, getActivity() - .getString(R.string.download_all)); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.clear_queue_item: - manager.clearQueue(getActivity()); - break; - case R.id.download_all_item: - manager.downloadAllItemsInQueue(getActivity()); - fila.notifyDataSetChanged(); - break; - default: - return false; - } - return true; - } - - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - View headerView = getLayoutInflater(savedInstanceState).inflate(R.layout.feeditemlist_header, null); - TextView headerTitle = (TextView) headerView.findViewById(R.id.txtvHeaderTitle); - headerTitle.setText(R.string.queue_label); - headerView.setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View v) { - - } - }); - getListView().addHeaderView(headerView); - super.onViewCreated(view, savedInstanceState); - } - -} diff --git a/src/de/danoeh/antennapod/fragment/UnreadItemlistFragment.java b/src/de/danoeh/antennapod/fragment/UnreadItemlistFragment.java deleted file mode 100644 index 5eddbf431..000000000 --- a/src/de/danoeh/antennapod/fragment/UnreadItemlistFragment.java +++ /dev/null @@ -1,78 +0,0 @@ -package de.danoeh.antennapod.fragment; - -import android.os.Bundle; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.TextView; - -import com.actionbarsherlock.view.Menu; -import com.actionbarsherlock.view.MenuInflater; -import com.actionbarsherlock.view.MenuItem; - -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.adapter.AbstractFeedItemlistAdapter; -import de.danoeh.antennapod.adapter.ExternalFeedItemlistAdapter; -import de.danoeh.antennapod.feed.FeedManager; - -/** Contains all unread items. */ -public class UnreadItemlistFragment extends ItemlistFragment { - - public UnreadItemlistFragment() { - super(FeedManager.getInstance().getUnreadItems(), true); - - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setHasOptionsMenu(true); - } - - protected AbstractFeedItemlistAdapter createListAdapter() { - return new ExternalFeedItemlistAdapter(getActivity(), 0, items, - adapterCallback); - } - - @Override - public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - super.onCreateOptionsMenu(menu, inflater); - menu.add(Menu.NONE, R.id.mark_all_read_item, Menu.NONE, getActivity() - .getString(R.string.mark_all_read_label)); - menu.add(Menu.NONE, R.id.enqueue_all_item, Menu.NONE, getActivity() - .getString(R.string.enqueue_all_new)); - } - - @Override - public void onPrepareOptionsMenu(Menu menu) { - super.onPrepareOptionsMenu(menu); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.mark_all_read_item: - manager.markAllItemsRead(getActivity()); - break; - case R.id.enqueue_all_item: - manager.enqueueAllNewItems(getActivity()); - break; - default: - return false; - } - return true; - } - - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - View headerView = getLayoutInflater(savedInstanceState).inflate( - R.layout.feeditemlist_header, null); - TextView headerTitle = (TextView) headerView - .findViewById(R.id.txtvHeaderTitle); - headerTitle.setText(R.string.new_label); - - - getListView().addHeaderView(headerView); - super.onViewCreated(view, savedInstanceState); - } - -}