aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-01-12 15:50:09 -0800
committerDominik Schürmann <dominik@dominikschuermann.de>2014-01-12 15:50:09 -0800
commit92aa5b36bba57e4927f146d49c9f124a37b7b5f9 (patch)
tree865d3962e54225fc4f13e0d19852ddc061e7e05f /OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
parent536c4db48f12287eaf1875e2d208c0ad07e31ee6 (diff)
parente3bcf64d9e63e293c51db921572a9b87533d26ad (diff)
downloadopen-keychain-92aa5b36bba57e4927f146d49c9f124a37b7b5f9.tar.gz
open-keychain-92aa5b36bba57e4927f146d49c9f124a37b7b5f9.tar.bz2
open-keychain-92aa5b36bba57e4927f146d49c9f124a37b7b5f9.zip
Merge pull request #179 from dschuermann/key-details
Key details
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java')
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java55
1 files changed, 17 insertions, 38 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
index 13350b6c6..d604c1c86 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
@@ -17,24 +17,21 @@
package org.sufficientlysecure.keychain.ui;
+import java.util.ArrayList;
+
import org.sufficientlysecure.keychain.R;
+import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
+import android.support.v4.view.ViewPager;
import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
-import com.actionbarsherlock.view.MenuItem;
-
-import java.util.ArrayList;
-
-import android.content.Context;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentPagerAdapter;
-import android.support.v4.view.ViewPager;
-
import com.actionbarsherlock.app.SherlockFragmentActivity;
public class HelpActivity extends SherlockFragmentActivity {
@@ -45,37 +42,19 @@ public class HelpActivity extends SherlockFragmentActivity {
TextView tabCenter;
TextView tabText;
- /**
- * Menu Items
- */
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- // app icon in Action Bar clicked; go home
- Intent intent = new Intent(this, MainActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(intent);
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+
setContentView(R.layout.help_activity);
- mViewPager = new ViewPager(this);
- mViewPager.setId(R.id.pager);
+ mViewPager = (ViewPager) findViewById(R.id.pager);
- setContentView(mViewPager);
- ActionBar bar = getSupportActionBar();
- bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
- bar.setDisplayShowTitleEnabled(true);
- bar.setDisplayHomeAsUpEnabled(true);
+ final ActionBar actionBar = getSupportActionBar();
+ actionBar.setDisplayShowTitleEnabled(true);
+ actionBar.setDisplayHomeAsUpEnabled(false);
+ actionBar.setHomeButtonEnabled(false);
+ actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
mTabsAdapter = new TabsAdapter(this, mViewPager);
@@ -87,20 +66,20 @@ public class HelpActivity extends SherlockFragmentActivity {
Bundle startBundle = new Bundle();
startBundle.putInt(HelpFragmentHtml.ARG_HTML_FILE, R.raw.help_start);
- mTabsAdapter.addTab(bar.newTab().setText(getString(R.string.help_tab_start)),
+ mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_start)),
HelpFragmentHtml.class, startBundle, (selectedTab == 0 ? true : false));
Bundle nfcBundle = new Bundle();
nfcBundle.putInt(HelpFragmentHtml.ARG_HTML_FILE, R.raw.help_nfc_beam);
- mTabsAdapter.addTab(bar.newTab().setText(getString(R.string.help_tab_nfc_beam)),
+ mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_nfc_beam)),
HelpFragmentHtml.class, nfcBundle, (selectedTab == 1 ? true : false));
Bundle changelogBundle = new Bundle();
changelogBundle.putInt(HelpFragmentHtml.ARG_HTML_FILE, R.raw.help_changelog);
- mTabsAdapter.addTab(bar.newTab().setText(getString(R.string.help_tab_changelog)),
+ mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_changelog)),
HelpFragmentHtml.class, changelogBundle, (selectedTab == 2 ? true : false));
- mTabsAdapter.addTab(bar.newTab().setText(getString(R.string.help_tab_about)),
+ mTabsAdapter.addTab(actionBar.newTab().setText(getString(R.string.help_tab_about)),
HelpFragmentAbout.class, null, (selectedTab == 3 ? true : false));
}