From 7b4aa15f85c3cb689c0c0f3af9e2aedf17324457 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sun, 23 Sep 2012 20:40:33 +0200 Subject: [PATCH] Moved loadMediaInfo into onStart() --- .../antennapod/fragment/CoverFragment.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/de/danoeh/antennapod/fragment/CoverFragment.java b/src/de/danoeh/antennapod/fragment/CoverFragment.java index d9a6bdd42..945495670 100644 --- a/src/de/danoeh/antennapod/fragment/CoverFragment.java +++ b/src/de/danoeh/antennapod/fragment/CoverFragment.java @@ -10,6 +10,7 @@ import android.widget.TextView; import com.actionbarsherlock.app.SherlockFragment; +import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.R; import de.danoeh.antennapod.asynctask.FeedImageLoader; import de.danoeh.antennapod.feed.Feed; @@ -72,16 +73,6 @@ public class CoverFragment extends SherlockFragment { return root; } - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - if (media != null) { - loadMediaInfo(); - } else { - Log.w(TAG, "Unable to load media info: media was null"); - } - } - private void loadMediaInfo() { imgvCover.post(new Runnable() { @@ -96,4 +87,16 @@ public class CoverFragment extends SherlockFragment { txtvFeed.setText(media.getItem().getFeed().getTitle()); } + @Override + public void onStart() { + super.onStart(); + if (media != null) { + if (AppConfig.DEBUG) + Log.d(TAG, "Loading media info"); + loadMediaInfo(); + } else { + Log.w(TAG, "Unable to load media info: media was null"); + } + } + }