aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-10-24 20:51:56 -0700
committerScott Jackson <daneren2005@gmail.com>2013-10-24 20:51:56 -0700
commit71b668357293b5f2f803ac3a601c2b4f0641b795 (patch)
tree13c2c4ed10c00e8e7f42c4221fbb4aa67c3821d6 /src
parenteab55ff830dfeb045225307f0bf51cb3cacc01d6 (diff)
downloaddsub-71b668357293b5f2f803ac3a601c2b4f0641b795.tar.gz
dsub-71b668357293b5f2f803ac3a601c2b4f0641b795.tar.bz2
dsub-71b668357293b5f2f803ac3a601c2b4f0641b795.zip
Remove useless help page
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/activity/HelpActivity.java117
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java4
2 files changed, 0 insertions, 121 deletions
diff --git a/src/github/daneren2005/dsub/activity/HelpActivity.java b/src/github/daneren2005/dsub/activity/HelpActivity.java
deleted file mode 100644
index 6dc516bf..00000000
--- a/src/github/daneren2005/dsub/activity/HelpActivity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- This file is part of Subsonic.
-
- Subsonic is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Subsonic is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
-
- Copyright 2009 (C) Sindre Mehus
- */
-
-package github.daneren2005.dsub.activity;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.Window;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-import android.widget.Button;
-import github.daneren2005.dsub.R;
-import github.daneren2005.dsub.util.Util;
-
-/**
- * An HTML-based help screen with Back and Done buttons at the bottom.
- *
- * @author Sindre Mehus
- */
-public final class HelpActivity extends Activity {
-
- private WebView webView;
- private Button backButton;
-
- @Override
- protected void onCreate(Bundle bundle) {
- super.onCreate(bundle);
- getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-
- setContentView(R.layout.help);
-
- webView = (WebView) findViewById(R.id.help_contents);
- webView.getSettings().setJavaScriptEnabled(true);
- webView.setWebViewClient(new HelpClient());
- if (bundle != null) {
- webView.restoreState(bundle);
- } else {
- webView.loadUrl(getResources().getString(R.string.help_url));
- }
-
- backButton = (Button) findViewById(R.id.help_back);
- backButton.setOnClickListener(new Button.OnClickListener() {
- @Override
- public void onClick(View view) {
- webView.goBack();
- }
- });
-
- Button doneButton = (Button) findViewById(R.id.help_close);
- doneButton.setOnClickListener(new Button.OnClickListener() {
- @Override
- public void onClick(View view) {
- finish();
- }
- });
- }
-
- @Override
- public void onResume() {
- super.onResume();
- }
-
- @Override
- protected void onSaveInstanceState(Bundle state) {
- webView.saveState(state);
- }
-
- @Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_BACK) {
- if (webView.canGoBack()) {
- webView.goBack();
- return true;
- }
- }
- return super.onKeyDown(keyCode, event);
- }
-
- private final class HelpClient extends WebViewClient {
- @Override
- public void onLoadResource(WebView webView, String url) {
- setProgressBarIndeterminateVisibility(true);
- setTitle(getResources().getString(R.string.help_loading));
- super.onLoadResource(webView, url);
- }
-
- @Override
- public void onPageFinished(WebView view, String url) {
- setProgressBarIndeterminateVisibility(false);
- setTitle(view.getTitle());
- backButton.setEnabled(view.canGoBack());
- }
-
- @Override
- public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
- Util.toast(HelpActivity.this, description);
- }
- }
-}
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 048d75e8..1a55d1d0 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -41,7 +41,6 @@ import android.widget.EditText;
import android.widget.TextView;
import github.daneren2005.dsub.R;
import github.daneren2005.dsub.activity.DownloadActivity;
-import github.daneren2005.dsub.activity.HelpActivity;
import github.daneren2005.dsub.activity.SearchActivity;
import github.daneren2005.dsub.activity.SettingsActivity;
import github.daneren2005.dsub.activity.SubsonicActivity;
@@ -132,9 +131,6 @@ public class SubsonicFragment extends Fragment {
case R.id.menu_settings:
startActivity(new Intent(context, SettingsActivity.class));
return true;
- case R.id.menu_help:
- startActivity(new Intent(context, HelpActivity.class));
- return true;
}
return false;