Removed unused classes

This commit is contained in:
daniel oeh 2013-01-27 19:40:09 +01:00
parent a227e0ebfd
commit 74dd134848
5 changed files with 0 additions and 240 deletions

View File

@ -2,8 +2,6 @@
<item name="action_bar_refresh" type="id"/>
<item name="action_bar_add" type="id"/>
<item name="move_up_item" type="id"/>
<item name="move_down_item" type="id"/>
<item type="id" name="clear_queue_item"/>
<item type="id" name="select_all_item"/>
<item type="id" name="deselect_all_item"/>

View File

@ -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;

View File

@ -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<FeedItem> 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;
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}