diff options
Diffstat (limited to 'src/cgeo/geocaching/cgeohelpers.java')
| -rw-r--r-- | src/cgeo/geocaching/cgeohelpers.java | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/src/cgeo/geocaching/cgeohelpers.java b/src/cgeo/geocaching/cgeohelpers.java index 33a596c..0492656 100644 --- a/src/cgeo/geocaching/cgeohelpers.java +++ b/src/cgeo/geocaching/cgeohelpers.java @@ -2,21 +2,18 @@ package cgeo.geocaching; import java.util.Locale; -import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Resources; import android.net.Uri; import android.os.Bundle; import android.view.View; +import cgeo.geocaching.activity.AbstractActivity; -public class cgeohelpers extends Activity { +public class cgeohelpers extends AbstractActivity { - private cgeoapplication app = null; private Resources res = null; - private Activity activity = null; private cgSettings settings = null; - private cgBase base = null; private SharedPreferences prefs = null; @Override @@ -24,21 +21,13 @@ public class cgeohelpers extends Activity { super.onCreate(savedInstanceState); // init - activity = this; res = this.getResources(); - app = (cgeoapplication) this.getApplication(); prefs = getSharedPreferences(cgSettings.preferences, 0); settings = new cgSettings(this, prefs); - base = new cgBase(app, settings, prefs); - // set layout - if (settings.skin == 1) { - setTheme(R.style.light); - } else { - setTheme(R.style.dark); - } + setTheme(); setContentView(R.layout.helpers); - base.setTitle(activity, res.getString(R.string.helpers)); + setTitle(res.getString(R.string.helpers)); } @Override @@ -54,9 +43,9 @@ public class cgeohelpers extends Activity { try { if (lng.equalsIgnoreCase("de")) { - activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:gnu.android.app.cgeomanual.de"))); + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:gnu.android.app.cgeomanual.de"))); } else { - activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:gnu.android.app.cgeomanual.en"))); + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:gnu.android.app.cgeomanual.en"))); } } catch (Exception e) { // market not available in standard emulator @@ -68,7 +57,7 @@ public class cgeohelpers extends Activity { public void installLocus(View view) { try { - activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:menion.android.locus"))); + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:menion.android.locus"))); } catch (Exception e) { // market not available in standard emulator } @@ -79,7 +68,7 @@ public class cgeohelpers extends Activity { public void installGpsStatus(View view) { try { - activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.eclipsim.gpsstatus2"))); + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.eclipsim.gpsstatus2"))); } catch (Exception e) { // market not available in standard emulator } @@ -89,15 +78,11 @@ public class cgeohelpers extends Activity { public void installBluetoothGps(View view) { try { - activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:googoo.android.btgps"))); + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:googoo.android.btgps"))); } catch (Exception e) { // market not available in standard emulator } finish(); } - - public void goHome(View view) { - base.goHome(activity); - } } |
