]> cvs.zerfleddert.de Git - FreeShisen/blobdiff - src/de/cwde/freeshisen/ShisenShoActivity.java
scale down veit tileset to reduce size of package
[FreeShisen] / src / de / cwde / freeshisen / ShisenShoActivity.java
index 88666da2697ddd567fb9f44b0ac51b370880daa0..483c6f1f57b7c7b172c5407ad4c1762a9ec72669 100644 (file)
@@ -2,6 +2,7 @@ package de.cwde.freeshisen;
 
 import android.app.Activity;
 import android.app.AlertDialog;
 
 import android.app.Activity;
 import android.app.AlertDialog;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -28,8 +29,6 @@ public class ShisenShoActivity extends Activity {
                PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
 
                requestWindowFeature(Window.FEATURE_NO_TITLE);
                PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
 
                requestWindowFeature(Window.FEATURE_NO_TITLE);
-               //getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
-               //              WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
                view = ShisenSho.app().getView();
                ShisenSho.app().activity = this;
 
                view = ShisenSho.app().getView();
                ShisenSho.app().activity = this;
@@ -94,8 +93,9 @@ public class ShisenShoActivity extends Activity {
                PackageInfo pInfo;
                try {
                        pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);
                PackageInfo pInfo;
                try {
                        pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);
-                       String aboutTitle = String.format("About %s", getString(R.string.app_name));
-                       String versionString = String.format("Version: %s", pInfo.versionName);
+                       String appname = getString(R.string.app_name);
+                       String aboutTitle = "About " + appname;
+                       String versionString = appname + " "+ pInfo.versionName;
                        String aboutText = getString(R.string.aboutText);
 
                        // Set up the TextView
                        String aboutText = getString(R.string.aboutText);
 
                        // Set up the TextView
@@ -106,7 +106,7 @@ public class ShisenShoActivity extends Activity {
                        // Set some padding
                        message.setPadding(5, 5, 5, 5);
                        // Set up the final string
                        // Set some padding
                        message.setPadding(5, 5, 5, 5);
                        // Set up the final string
-                       message.setText(versionString + "\n" + s);
+                       message.setText(versionString + s);
                        // Now linkify the text
                        Linkify.addLinks(message, Linkify.ALL);
 
                        // Now linkify the text
                        Linkify.addLinks(message, Linkify.ALL);
 
@@ -114,11 +114,30 @@ public class ShisenShoActivity extends Activity {
                        .setTitle(aboutTitle)
                        .setCancelable(true)
                        .setIcon(R.drawable.icon)
                        .setTitle(aboutTitle)
                        .setCancelable(true)
                        .setIcon(R.drawable.icon)
-                       .setPositiveButton(getString(android.R.string.ok), null)
+                       .setPositiveButton(android.R.string.ok, null)
                        .setView(message).create()
                        .show();
                } catch (NameNotFoundException e) {
                        e.printStackTrace();
                }
        }
                        .setView(message).create()
                        .show();
                } catch (NameNotFoundException e) {
                        e.printStackTrace();
                }
        }
+
+       public void onOptionsChanged()
+       {
+               new AlertDialog.Builder(this)
+               .setTitle(R.string.prefchange_confirm_title)
+               .setCancelable(true)
+               .setIcon(R.drawable.icon)
+               .setPositiveButton(android.R.string.yes,
+                               new DialogInterface.OnClickListener() {
+                       public void onClick(DialogInterface dialog, int id) {
+                               // User clicked OK button - reset game
+                               view.reset();
+                       }
+               })
+               .setNegativeButton(android.R.string.no, null)
+               .setMessage(R.string.prefchange_confirm_text)
+               .create()
+               .show();
+       }
 }
 }
Impressum, Datenschutz