浏览代码

Updated the Android Demos to have splashscreens

unknown 13 年之前
父节点
当前提交
0738c43ea9

+ 3 - 0
Samples/Android/CatapultWarsNet/Activity1.cs

@@ -11,8 +11,11 @@ using Android.Content.PM;
 
 namespace CatapultWarsNet
 {
+	
 	[Activity (Label = "CatapultWarsNet"
 	           , MainLauncher = true
+	           ,Icon = "@drawable/icon"
+	           , Theme = "@style/Theme.Splash"
 	           ,ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.Keyboard|ConfigChanges.KeyboardHidden)]
 	public class Activity1 : AndroidGameActivity
 	{

+ 4 - 0
Samples/Android/CatapultWarsNet/CatapultNetWars.csproj

@@ -162,6 +162,9 @@
   <ItemGroup>
     <AndroidResource Include="Resources\drawable\Icon.png" />
     <AndroidResource Include="Resources\values\Strings.xml" />
+    <AndroidResource Include="Resources\drawable\Splash.png" />
+    <AndroidResource Include="Resources\values\Styles.xml" />
+    <AndroidResource Include="Resources\drawable-port\Splash.png" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
   <ItemGroup>
@@ -202,6 +205,7 @@
     <Folder Include="Assets\Content\Textures\Catapults\Red\redFire\" />
     <Folder Include="Assets\Content\Textures\Catapults\Red\redIdle\" />
     <Folder Include="Assets\Content\Textures\Catapults\Red\redPullback\" />
+    <Folder Include="Resources\drawable-port\" />
   </ItemGroup>
   <ItemGroup>
     <AndroidAsset Include="..\..\MacOS\CatapultNetWars\Content\Fonts\HUDFont.xnb">

+ 15 - 1
Samples/Android/CatapultWarsNet/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.488
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -29,6 +29,9 @@ namespace CatapultWarsNet
 			// aapt resource value: 0x7f020000
 			public const int Icon = 2130837504;
 			
+			// aapt resource value: 0x7f020001
+			public const int Splash = 2130837505;
+			
 			private Drawable()
 			{
 			}
@@ -161,5 +164,16 @@ namespace CatapultWarsNet
 			{
 			}
 		}
+		
+		public partial class Style
+		{
+			
+			// aapt resource value: 0x7f040000
+			public const int Theme_Splash = 2130968576;
+			
+			private Style()
+			{
+			}
+		}
 	}
 }

二进制
Samples/Android/CatapultWarsNet/Resources/drawable-land/Splash.png


二进制
Samples/Android/CatapultWarsNet/Resources/drawable-port/Splash.png


二进制
Samples/Android/CatapultWarsNet/Resources/drawable/Icon.png


二进制
Samples/Android/CatapultWarsNet/Resources/drawable/Splash.png


+ 1 - 1
Samples/Android/MonoGame.Samples.AdMob/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.488
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 1 - 1
Samples/Android/MonoGame.Samples.CatapultWars/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.488
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 5 - 0
Samples/Android/MonoGame.Samples.Input/Game1.cs

@@ -76,6 +76,11 @@ namespace MonoGame.Samples.Input
 		/// <param name="gameTime">Provides a snapshot of timing values.</param>
 		protected override void Update (GameTime gameTime)
 		{			
+			if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
+			{
+				Exit();
+			}
+			
 			currentKeyboardState = Keyboard.GetState ();
 			currentGamePadState = GamePad.GetState (PlayerIndex.One);
 			currentTouchState = TouchPanel.GetState();

+ 1 - 1
Samples/Android/MonoGame.Samples.Input/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.488
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

+ 2 - 0
Samples/Android/Orientation/Activity1.cs

@@ -12,6 +12,8 @@ using Microsoft.Xna.Framework;
 namespace Orientation
 {
 	[Activity (Label = "Orientation", MainLauncher = true
+	           ,Icon = "@drawable/icon"
+	           , Theme = "@style/Theme.Splash"
 	           ,ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.Keyboard|ConfigChanges.KeyboardHidden)]
 	public class Activity1 : AndroidGameActivity
 	{

+ 2 - 0
Samples/Android/Orientation/Orientation.csproj

@@ -55,6 +55,8 @@
   </ItemGroup>
   <ItemGroup>
     <AndroidResource Include="Resources\drawable\Icon.png" />
+    <AndroidResource Include="Resources\values\Styles.xml" />
+    <AndroidResource Include="Resources\drawable\Splash.png" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
   <ItemGroup>

+ 15 - 1
Samples/Android/Orientation/Resources/Resource.designer.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.488
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -29,9 +29,23 @@ namespace Orientation
 			// aapt resource value: 0x7f020000
 			public const int Icon = 2130837504;
 			
+			// aapt resource value: 0x7f020001
+			public const int Splash = 2130837505;
+			
 			private Drawable()
 			{
 			}
 		}
+		
+		public partial class Style
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Theme_Splash = 2130903040;
+			
+			private Style()
+			{
+			}
+		}
 	}
 }