Implemented Fragment for showing the queue

This commit is contained in:
daniel oeh 2012-06-24 17:28:34 +02:00
parent e3115f1ae4
commit b283eae1b9
4 changed files with 26 additions and 0 deletions

View File

@ -59,4 +59,5 @@
<string name="show_info_label">Show information</string>
<string name="remove_feed_label">Remove Feed</string>
<string name="position_default_label">00:00:00</string>
<string name="queue_label">Queue</string>
</resources>

View File

@ -20,6 +20,7 @@ import de.podfetcher.R;
import de.podfetcher.feed.FeedManager;
import de.podfetcher.fragment.FeedItemlistFragment;
import de.podfetcher.fragment.FeedlistFragment;
import de.podfetcher.fragment.QueueFragment;
import de.podfetcher.fragment.UnreadItemlistFragment;
public class PodfetcherActivity extends SherlockFragmentActivity {
@ -59,6 +60,15 @@ public class PodfetcherActivity extends SherlockFragmentActivity {
R.string.new_label).toString(),
UnreadItemlistFragment.class));
actionBar.addTab(tab);
tab = actionBar
.newTab()
.setText(getText(R.string.queue_label).toString())
.setTabListener(
new TabListener<QueueFragment>(this, getText(
R.string.queue_label).toString(),
QueueFragment.class));
actionBar.addTab(tab);
}
@Override

View File

@ -502,4 +502,8 @@ public class FeedManager {
return downloadLog;
}
public ArrayList<FeedItem> getQueue() {
return queue;
}
}

View File

@ -0,0 +1,11 @@
package de.podfetcher.fragment;
import de.podfetcher.feed.FeedManager;
public class QueueFragment extends FeedItemlistFragment {
public QueueFragment() {
super(FeedManager.getInstance().getQueue());
}
}