]> git.zerfleddert.de Git - FreeShisen/commitdiff
add highscore menu option
authorgitknilch <gitknilch@cwde.de>
Thu, 7 Mar 2013 19:56:47 +0000 (20:56 +0100)
committergitknilch <gitknilch@cwde.de>
Thu, 7 Mar 2013 19:56:47 +0000 (20:56 +0100)
Change-Id: I8422784f7841d656bbf440ea8c7e64d2c430b593
Signed-off-by: gitknilch <gitknilch@cwde.de>
AndroidManifest.xml
res/menu/menu.xml
src/de/cwde/freeshisen/ShisenShoActivity.java

index 1f6e324de0afa1c7b1ed0f5fd6cbceda7694315c..a276329219f30807151a7d61861bba049d47b3d6 100644 (file)
@@ -7,6 +7,7 @@
     <uses-sdk
         android:minSdkVersion="5"
         android:targetSdkVersion="10" >
+
         <!-- targetSdkVersion *must* be <=10 so we can show the legacy "menu" button -->
     </uses-sdk>
 
@@ -31,6 +32,7 @@
             <meta-data
                 android:name="android.support.PARENT_ACTIVITY"
                 android:value="de.cwde.freeshisen.ShisenShoActivity" />
+
             <intent-filter>
                 <action android:name="de.cwde.freeshisen.SETTINGS" />
 
             <meta-data
                 android:name="android.support.PARENT_ACTIVITY"
                 android:value="de.cwde.freeshisen.ShisenShoActivity" />
+
+            <intent-filter>
+                <action android:name="de.cwde.freeshisen.HISCORE" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
         </activity>
     </application>
 
index 59e6bc4d2c84e9b87c14a78ed8acc307827110f1..0ed7bbeb2b745d9368dfecb2b82507e37ce9bebf 100644 (file)
         android:icon="@android:drawable/ic_menu_preferences"
         android:title="@string/options">
     </item>
-<!-- <item
+    <item
         android:id="@+id/hiscore"
+        android:icon="@android:drawable/ic_menu_myplaces"
         android:title="@string/besttimes">
     </item>
- -->
     <item
         android:id="@+id/about"
         android:icon="@android:drawable/ic_menu_info_details"
index 0478d07416286e8bf7172bebd64f96f4bdfee43a..88666da2697ddd567fb9f44b0ac51b370880daa0 100644 (file)
@@ -75,8 +75,11 @@ public class ShisenShoActivity extends Activity {
                case R.id.undo:
                case R.id.clean:
                        return view.onOptionsItemSelected(item);
+               case R.id.hiscore:
+                       startActivity(new Intent("de.cwde.freeshisen.HISCORE", null));
+                       return true;
                case R.id.options:
-                       startActivityForResult(new Intent("de.cwde.freeshisen.SETTINGS", null), 0);
+                       startActivity(new Intent("de.cwde.freeshisen.SETTINGS", null));
                        return true;
                case R.id.about:
                        onAboutActivate();
Impressum, Datenschutz