diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-02-07 10:35:35 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-02-07 10:35:35 +0100 |
commit | 3c351e5e5e0fafc76a7adb67c2429a49d1d64ffb (patch) | |
tree | 9b95237a6ffe21cf748c3c5f79bd505ff2e5479d /src/de/blinkt/openvpn | |
parent | b6386e685176add87a06943d34bf01d8cd1dbea4 (diff) |
Give the log window a natural up actionv0.5.31
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r-- | src/de/blinkt/openvpn/LogWindow.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/LogWindow.java index 88615e12..8d6df5e5 100644 --- a/src/de/blinkt/openvpn/LogWindow.java +++ b/src/de/blinkt/openvpn/LogWindow.java @@ -236,9 +236,18 @@ public class LogWindow extends ListActivity implements StateListener { Toast.makeText(this, R.string.log_no_last_vpn, Toast.LENGTH_LONG).show(); } + } else if(item.getItemId() == android.R.id.home) { + // This is called when the Home (Up) button is pressed + // in the Action Bar. + Intent parentActivityIntent = new Intent(this, MainActivity.class); + parentActivityIntent.addFlags( + Intent.FLAG_ACTIVITY_CLEAR_TOP | + Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(parentActivityIntent); + finish(); + return true; } - return super.onOptionsItemSelected(item); } @@ -324,6 +333,8 @@ public class LogWindow extends ListActivity implements StateListener { lv.setAdapter(ladapter); mSpeedView = (TextView) findViewById(R.id.speed); + getActionBar().setDisplayHomeAsUpEnabled(true); + } @Override |