From 48cf90fab40a3d4d944a00b2aa6adf81a681fc10 Mon Sep 17 00:00:00 2001 From: magicgoose Date: Wed, 19 Feb 2014 23:16:54 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=D0=BD=D0=B5=20=D0=BF=D1=80=D0=BE=D0=BF?= =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=B0=D0=B5=D0=BC=20=D0=BE=D1=88=D0=B8=D0=B1?= =?UTF-8?q?=D0=BA=D1=83=20=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=20(Social=5FiOS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Social/IOs/MainController.cs | 2 +- Social/IOs/{Social.csproj => Social_iOS.csproj} | 0 Social/Social.sln | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename Social/IOs/{Social.csproj => Social_iOS.csproj} (100%) diff --git a/Social/IOs/MainController.cs b/Social/IOs/MainController.cs index ac65382..e0fe866 100644 --- a/Social/IOs/MainController.cs +++ b/Social/IOs/MainController.cs @@ -49,7 +49,7 @@ namespace Social if (FBDialogs.CanPresentShareDialog (shareParams)) PresentFacebookShareDialog (shareParams); else - ; + throw new Exception("Can't present share dialog"); } private void PresentFacebookShareDialog(FBShareDialogParams shareParams) diff --git a/Social/IOs/Social.csproj b/Social/IOs/Social_iOS.csproj similarity index 100% rename from Social/IOs/Social.csproj rename to Social/IOs/Social_iOS.csproj diff --git a/Social/Social.sln b/Social/Social.sln index 9d8ed25..2dfeb9d 100644 --- a/Social/Social.sln +++ b/Social/Social.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Social", "IOs\Social.csproj", "{CC0EE67C-0932-4C64-A5D7-6714994CA602}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Social_iOS", "IOs\Social_iOS.csproj", "{CC0EE67C-0932-4C64-A5D7-6714994CA602}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,6 +27,6 @@ Global {CC0EE67C-0932-4C64-A5D7-6714994CA602}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = IOs\Social.csproj + StartupItem = IOs\Social_iOS.csproj EndGlobalSection EndGlobal From 52e08d0593d1ac6c462418c30dd913eb6bfc86ff Mon Sep 17 00:00:00 2001 From: magicgoose Date: Wed, 19 Feb 2014 23:27:46 +0400 Subject: [PATCH 2/3] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=20=D1=88=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D0=B3=D0=B0=20=D1=81=20=D0=BF=D0=BE=D0=BC=D0=BE?= =?UTF-8?q?=D1=89=D1=8C=D1=8E=20implicit=20intent=20=D0=BD=D0=B0=20=D0=B0?= =?UTF-8?q?=D0=BD=D0=B4=D1=80=D0=BE=D0=B8=D0=B4=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- Social/IOs/MainController.cs | 2 +- Social/Share_Android/Assets/AboutAssets.txt | 19 +++ Social/Share_Android/MainActivity.cs | 40 +++++++ .../Properties/AndroidManifest.xml | 6 + .../Share_Android/Properties/AssemblyInfo.cs | 23 ++++ .../Resources/AboutResources.txt | 44 +++++++ .../Resources/Resource.designer.cs | 112 ++++++++++++++++++ .../Share_Android/Resources/drawable/Icon.png | Bin 0 -> 2574 bytes .../Share_Android/Resources/layout/Main.axml | 6 + .../Resources/values/Strings.xml | 5 + Social/Share_Android/Share_Android.csproj | 68 +++++++++++ Social/Social.sln | 16 ++- 13 files changed, 341 insertions(+), 3 deletions(-) create mode 100644 Social/Share_Android/Assets/AboutAssets.txt create mode 100644 Social/Share_Android/MainActivity.cs create mode 100644 Social/Share_Android/Properties/AndroidManifest.xml create mode 100644 Social/Share_Android/Properties/AssemblyInfo.cs create mode 100644 Social/Share_Android/Resources/AboutResources.txt create mode 100644 Social/Share_Android/Resources/Resource.designer.cs create mode 100644 Social/Share_Android/Resources/drawable/Icon.png create mode 100644 Social/Share_Android/Resources/layout/Main.axml create mode 100644 Social/Share_Android/Resources/values/Strings.xml create mode 100644 Social/Share_Android/Share_Android.csproj diff --git a/.gitignore b/.gitignore index d59562a..b167e9d 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,5 @@ Generated_Code #added for RIA/Silverlight projects _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML -Tickets.userprefs \ No newline at end of file +Tickets.userprefs +*.userprefs diff --git a/Social/IOs/MainController.cs b/Social/IOs/MainController.cs index e0fe866..59f3932 100644 --- a/Social/IOs/MainController.cs +++ b/Social/IOs/MainController.cs @@ -49,7 +49,7 @@ namespace Social if (FBDialogs.CanPresentShareDialog (shareParams)) PresentFacebookShareDialog (shareParams); else - throw new Exception("Can't present share dialog"); + throw new Exception("Can't present share dialog"); // possibly there are no accounts } private void PresentFacebookShareDialog(FBShareDialogParams shareParams) diff --git a/Social/Share_Android/Assets/AboutAssets.txt b/Social/Share_Android/Assets/AboutAssets.txt new file mode 100644 index 0000000..a9b0638 --- /dev/null +++ b/Social/Share_Android/Assets/AboutAssets.txt @@ -0,0 +1,19 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); diff --git a/Social/Share_Android/MainActivity.cs b/Social/Share_Android/MainActivity.cs new file mode 100644 index 0000000..2be47bb --- /dev/null +++ b/Social/Share_Android/MainActivity.cs @@ -0,0 +1,40 @@ +using System; +using Android.App; +using Android.Content; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Android.OS; + +namespace Share_Android +{ + [Activity(Label = "Share_Android", MainLauncher = true)] + public class MainActivity : Activity + { + protected override void OnCreate(Bundle bundle) + { + base.OnCreate(bundle); + SetContentView(Resource.Layout.Main); + + Button button = FindViewById