From bc089c9e64be34b6a955865e3b6065b8623fb3f2 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Tue, 24 Jul 2012 14:46:10 +0200 Subject: Fixed behavior of 'up'-buttons --- src/de/danoeh/antennapod/activity/FeedItemlistActivity.java | 6 +++++- src/de/danoeh/antennapod/activity/ItemviewActivity.java | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/de') diff --git a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java index 27fb66d53..2f6cfe90e 100644 --- a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java +++ b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java @@ -1,5 +1,7 @@ package de.danoeh.antennapod.activity; +import android.annotation.SuppressLint; +import android.content.Intent; import android.graphics.drawable.BitmapDrawable; import android.os.AsyncTask; import android.os.Bundle; @@ -77,6 +79,7 @@ public class FeedItemlistActivity extends SherlockFragmentActivity { return FeedMenuHandler.onPrepareOptionsMenu(menu, feed); } + @SuppressLint("NewApi") @Override public boolean onOptionsItemSelected(MenuItem item) { if (FeedMenuHandler.onOptionsItemClicked(this, item, feed)) { @@ -99,7 +102,8 @@ public class FeedItemlistActivity extends SherlockFragmentActivity { } break; case android.R.id.home: - finish(); + startActivity(new Intent(this, MainActivity.class)); + break; } } return true; diff --git a/src/de/danoeh/antennapod/activity/ItemviewActivity.java b/src/de/danoeh/antennapod/activity/ItemviewActivity.java index 5fed8372f..43fc26314 100644 --- a/src/de/danoeh/antennapod/activity/ItemviewActivity.java +++ b/src/de/danoeh/antennapod/activity/ItemviewActivity.java @@ -2,6 +2,7 @@ package de.danoeh.antennapod.activity; import java.text.DateFormat; +import android.content.Intent; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.support.v4.app.FragmentManager; @@ -108,7 +109,9 @@ public class ItemviewActivity extends SherlockFragmentActivity { if (!FeedItemMenuHandler.onMenuItemClicked(this, menuItem, item)) { switch (menuItem.getItemId()) { case android.R.id.home: - finish(); + Intent upIntent = new Intent(this, FeedItemlistActivity.class); + upIntent.putExtra(FeedlistFragment.EXTRA_SELECTED_FEED, item.getFeed().getId()); + startActivity(upIntent); break; } } -- cgit v1.2.3