diff options
Diffstat (limited to 'src/de/danoeh/antennapod/activity/AudioplayerActivity.java')
-rw-r--r-- | src/de/danoeh/antennapod/activity/AudioplayerActivity.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java index 3587775a5..c469e70f9 100644 --- a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -16,7 +16,8 @@ import com.viewpagerindicator.TabPageIndicator; import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.R; -import de.danoeh.antennapod.adapter.SCListAdapter; +import de.danoeh.antennapod.adapter.ChapterListAdapter; +import de.danoeh.antennapod.feed.Chapter; import de.danoeh.antennapod.feed.FeedMedia; import de.danoeh.antennapod.feed.SimpleChapter; import de.danoeh.antennapod.fragment.CoverFragment; @@ -62,7 +63,7 @@ public class AudioplayerActivity extends MediaplayerActivity { FeedMedia media = controller.getMedia(); int tabcount = 2; - if (media != null && media.getItem().getSimpleChapters() != null) { + if (media != null && media.getItem().getChapters() != null) { tabcount = 3; } pagerAdapter = new MediaPlayerPagerAdapter(getSupportFragmentManager(), @@ -85,8 +86,7 @@ public class AudioplayerActivity extends MediaplayerActivity { } } - public class MediaPlayerPagerAdapter extends - FragmentStatePagerAdapter { + public class MediaPlayerPagerAdapter extends FragmentStatePagerAdapter { private int numItems; private AudioplayerActivity activity; @@ -109,8 +109,8 @@ public class AudioplayerActivity extends MediaplayerActivity { if (media != null) { switch (position) { case POS_COVER: - activity.coverFragment = CoverFragment - .newInstance(media.getItem()); + activity.coverFragment = CoverFragment.newInstance(media + .getItem()); return activity.coverFragment; case POS_DESCR: activity.descriptionFragment = ItemDescriptionFragment @@ -123,16 +123,15 @@ public class AudioplayerActivity extends MediaplayerActivity { public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); - SimpleChapter chapter = (SimpleChapter) this - .getListAdapter().getItem(position); + Chapter chapter = (Chapter) this.getListAdapter().getItem( + position); controller.seekToChapter(chapter); } }; - sCChapterFragment.setListAdapter(new SCListAdapter( - activity, 0, media.getItem() - .getSimpleChapters())); + sCChapterFragment.setListAdapter(new ChapterListAdapter( + activity, 0, media.getItem().getChapters())); return sCChapterFragment; default: |