diff --git a/src/de/danoeh/antennapod/activity/AddFeedActivity.java b/src/de/danoeh/antennapod/activity/AddFeedActivity.java index c17ef4996..2cf98a60c 100644 --- a/src/de/danoeh/antennapod/activity/AddFeedActivity.java +++ b/src/de/danoeh/antennapod/activity/AddFeedActivity.java @@ -17,6 +17,8 @@ import android.widget.Button; import android.widget.EditText; import com.actionbarsherlock.app.SherlockActivity; +import com.actionbarsherlock.view.Menu; +import com.actionbarsherlock.view.MenuItem; import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.R; @@ -46,6 +48,7 @@ public class AddFeedActivity extends SherlockActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); StorageUtils.checkStorageAvailability(this); setContentView(R.layout.addfeed); @@ -166,4 +169,22 @@ public class AddFeedActivity extends SherlockActivity { } errorDialog.show(); } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + finish(); + startActivity(new Intent(this, MainActivity.class)); + return true; + default: + return false; + } + } + }