From da78ea15d0e0d210edf6269f405b094ecdafb227 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 28 Jul 2012 16:05:55 +0200 Subject: [PATCH] AddServerActivity: Add up navigation. --- application/src/org/yaaic/activity/AddServerActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/src/org/yaaic/activity/AddServerActivity.java b/application/src/org/yaaic/activity/AddServerActivity.java index 6476a4d..d04f2fd 100644 --- a/application/src/org/yaaic/activity/AddServerActivity.java +++ b/application/src/org/yaaic/activity/AddServerActivity.java @@ -46,6 +46,7 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; +import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuInflater; @@ -79,6 +80,9 @@ public class AddServerActivity extends SherlockActivity implements OnClickListen setContentView(R.layout.serveradd); + ActionBar actionBar = getSupportActionBar(); + actionBar.setDisplayHomeAsUpEnabled(true); + authentication = new Authentication(); aliases = new ArrayList(); channels = new ArrayList(); @@ -179,6 +183,10 @@ public class AddServerActivity extends SherlockActivity implements OnClickListen case R.id.save: save(); return true; + + case android.R.id.home: + finish(); + break; } return super.onMenuItemSelected(featureId, item);