Add an Activity that shows the log fragment
[strongswan.git] / src / frontends / android / src / org / strongswan / android / ui / LogActivity.java
1 /*
2 * Copyright (C) 2012 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 package org.strongswan.android.ui;
17
18 import org.strongswan.android.R;
19
20 import android.app.Activity;
21 import android.os.Bundle;
22 import android.view.MenuItem;
23
24 public class LogActivity extends Activity
25 {
26 @Override
27 public void onCreate(Bundle savedInstanceState)
28 {
29 super.onCreate(savedInstanceState);
30 setContentView(R.layout.log_activity);
31
32 getActionBar().setDisplayHomeAsUpEnabled(true);
33 }
34
35 @Override
36 public boolean onOptionsItemSelected(MenuItem item)
37 {
38 switch (item.getItemId())
39 {
40 case android.R.id.home:
41 finish();
42 return true;
43 }
44 return super.onOptionsItemSelected(item);
45 }
46 }