Moved loadMediaInfo into onStart()

This commit is contained in:
daniel oeh 2012-09-23 20:40:33 +02:00
parent 0d9233d67a
commit 7b4aa15f85
1 changed files with 13 additions and 10 deletions

View File

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