├── GoogleMaps
├── bindings
│ ├── .gitignore
│ ├── src
│ │ ├── AssemblyInfo.cs
│ │ └── Android.GoogleMaps
│ │ │ ├── ItemizedOverlay.cs
│ │ │ ├── MyLocationOverlay.cs
│ │ │ ├── MapController.cs
│ │ │ └── TrackballGestureDetector.cs
│ ├── fieldmap.xml
│ ├── Maps.fixup
│ ├── methodmap.xml
│ └── Makefile
├── samples
│ └── MapsDemo
│ │ ├── MapsDemo
│ │ ├── Resources
│ │ │ ├── drawable-hdpi
│ │ │ │ └── app_sample_code.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── app_sample_code.png
│ │ │ ├── layout
│ │ │ │ ├── Main.axml
│ │ │ │ └── mapview.xml
│ │ │ ├── values
│ │ │ │ └── Strings.xml
│ │ │ ├── Resource.designer.cs
│ │ │ └── AboutResources.txt
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MapViewDemo.cs
│ │ ├── MapViewCompassDemo.cs
│ │ ├── MapsDemo.csproj
│ │ ├── RotateView.cs
│ │ └── MapsDemo.cs
│ │ └── MapsDemo.sln
└── README.md
├── Compatibility-v13
└── bindings
│ ├── .gitignore
│ ├── src
│ └── AssemblyInfo.cs
│ ├── EnumMethods.xml
│ ├── EnumFields.xml
│ ├── Makefile
│ └── Metadata.xml
├── Compatibility-v4
└── bindings
│ ├── .gitignore
│ ├── src
│ └── AssemblyInfo.cs
│ ├── EnumFields.xml
│ ├── EnumMethods.xml
│ ├── Makefile
│ └── Metadata.xml
├── Mono.Android.Compatibility.v4
├── .gitignore
├── Java
│ └── android-support-v4.jar
├── Transforms
│ ├── EnumMethods.xml
│ ├── EnumFields.xml
│ └── Metadata.xml
├── Additions
│ └── CursorLoader.cs
├── Mono.Android.Compatibility.v4.sln
├── Properties
│ └── AssemblyInfo.cs
└── Mono.Android.Compatibility.v4.csproj
├── CODE-OF-CONDUCT.md
├── Makefile
├── src
├── Android.Support.V4.Content
│ ├── Loader.cs
│ └── CursorLoader.cs
├── Android.Support.V4.Widget
│ ├── SlidingPaneLayout.cs
│ └── DrawerLayout.cs
└── Android.Support.V4.View
│ └── ViewPager.cs
├── README.md
└── configure
/GoogleMaps/bindings/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 |
--------------------------------------------------------------------------------
/Compatibility-v13/bindings/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 |
--------------------------------------------------------------------------------
/Compatibility-v13/bindings/src/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/src/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Java/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/monodroid-bindings/HEAD/Mono.Android.Compatibility.v4/Java/android-support-v4.jar
--------------------------------------------------------------------------------
/GoogleMaps/bindings/src/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | [assembly:Android.App.UsesLibrary (Name = "com.google.android.maps")]
2 | [assembly:Android.App.UsesPermission (Name = "android.permission.INTERNET")]
3 |
4 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/drawable-hdpi/app_sample_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/monodroid-bindings/HEAD/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/drawable-hdpi/app_sample_code.png
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/drawable-mdpi/app_sample_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/monodroid-bindings/HEAD/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/drawable-mdpi/app_sample_code.png
--------------------------------------------------------------------------------
/GoogleMaps/bindings/src/Android.GoogleMaps/ItemizedOverlay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.GoogleMaps {
4 |
5 | partial class ItemizedOverlay {
6 | protected void SetLastFocusedIndex (int value)
7 | {
8 | LastFocusedIndex = value;
9 | }
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | This project has adopted the code of conduct defined by the Contributor Covenant
4 | to clarify expected behavior in our community.
5 |
6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
7 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/src/Android.GoogleMaps/MyLocationOverlay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.GoogleMaps {
4 |
5 | partial class MyLocationOverlay {
6 |
7 | public bool RunOnFirstFix (Action action)
8 | {
9 | return RunOnFirstFix (new Java.Lang.Runnable (action));
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/src/Android.GoogleMaps/MapController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.GoogleMaps {
4 |
5 | partial class MapController {
6 |
7 | public void AnimateTo (Android.GoogleMaps.GeoPoint point, Action action)
8 | {
9 | AnimateTo (point, new Java.Lang.Runnable (action));
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/src/Android.GoogleMaps/TrackballGestureDetector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.GoogleMaps {
4 |
5 | partial class TrackballGestureDetector {
6 |
7 | public void RegisterLongPressCallback (Action action)
8 | {
9 | RegisterLongPressCallback (new Java.Lang.Runnable (action));
10 | }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | SUBDIRS:= Compatibility-v13/bindings Compatibility-v4/bindings GoogleMaps/bindings
2 |
3 | SUBDIRS_MAKE= @target=`echo $@ | sed -e 's/-recurse//'` && \
4 | for dir in $(SUBDIRS); do \
5 | echo "Making $$target in $$dir";\
6 | $(MAKE) -C $$dir $$target || exit 1; \
7 | done
8 |
9 | all:
10 | $(SUBDIRS_MAKE)
--------------------------------------------------------------------------------
/Compatibility-v13/bindings/EnumMethods.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Transforms/EnumMethods.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/EnumFields.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Compatibility-v13/bindings/EnumFields.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Transforms/EnumFields.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Android.Support.V4.Content/Loader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Android.Support.V4.Content
3 | {
4 | public partial class Loader
5 | {
6 | public partial class LoadCompleteEventArgs
7 | {
8 | [Obsolete ("Use Loader property instead")]
9 | public Loader P0 {
10 | get { return Loader; }
11 | }
12 | [Obsolete ("Use Data property instead")]
13 | public Java.Lang.Object P1 {
14 | get { return Data; }
15 | }
16 | }
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/layout/Main.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Android.Support.V4.Widget/SlidingPaneLayout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.Support.V4.Widget {
4 |
5 | partial class SlidingPaneLayout {
6 |
7 | partial class PanelClosedEventArgs {
8 |
9 | public global::Android.Views.View P0 {
10 | get {return Panel;}
11 | }
12 | }
13 |
14 | partial class PanelOpenedEventArgs {
15 |
16 | public global::Android.Views.View P0 {
17 | get {return Panel;}
18 | }
19 | }
20 |
21 | partial class PanelSlideEventArgs {
22 |
23 | public global::Android.Views.View P0 {
24 | get {return Panel;}
25 | }
26 |
27 | public float P1 {
28 | get {return SlideOffset;}
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
--------------------------------------------------------------------------------
/GoogleMaps/bindings/fieldmap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Android.Support.V4.Widget/DrawerLayout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Android.Support.V4.Widget {
4 |
5 | partial class DrawerLayout {
6 |
7 | partial class DrawerClosedEventArgs {
8 |
9 | public global::Android.Views.View P0 {
10 | get {return DrawerView;}
11 | }
12 | }
13 |
14 | partial class DrawerOpenedEventArgs {
15 |
16 | public global::Android.Views.View P0 {
17 | get {return DrawerView;}
18 | }
19 | }
20 |
21 | partial class DrawerSlideEventArgs {
22 |
23 | public global::Android.Views.View P0 {
24 | get {return DrawerView;}
25 | }
26 |
27 | public float P1 {
28 | get {return slideOffset;}
29 | }
30 | }
31 |
32 | partial class DrawerStateChangedEventArgs {
33 |
34 | public int P0 {
35 | get {return NewState;}
36 | }
37 | }
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | Maps API Demos
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/Android.Support.V4.View/ViewPager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace Android.Support.V4.View
3 | {
4 | public partial class ViewPager
5 | {
6 | public partial class PageScrolledEventArgs
7 | {
8 | [Obsolete ("Use Position property instead")]
9 | public int P0 {
10 | get { return Position; }
11 | }
12 | [Obsolete ("Use PositionOffset property instead")]
13 | public float P1 {
14 | get { return PositionOffset; }
15 | }
16 | [Obsolete ("Use PositionOffsetPixels property instead")]
17 | public int P2 {
18 | get { return PositionOffsetPixels; }
19 | }
20 | }
21 | public partial class PageScrollStateChangedEventArgs
22 | {
23 | [Obsolete ("Use State property instead")]
24 | public int P0 {
25 | get { return State; }
26 | }
27 | }
28 | public partial class PageSelectedEventArgs
29 | {
30 | [Obsolete ("Use Position property instead")]
31 | public int P0 {
32 | get { return Position; }
33 | }
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/src/Android.Support.V4.Content/CursorLoader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Runtime;
3 |
4 | namespace Android.Support.V4.Content {
5 |
6 | public partial class CursorLoader {
7 |
8 | static IntPtr id_loadInBackground;
9 | [Register ("loadInBackground", "()Landroid/database/Cursor;", "GetLoadInBackgroundHandler")]
10 | public override Java.Lang.Object LoadInBackground ()
11 | {
12 | if (id_loadInBackground == IntPtr.Zero)
13 | id_loadInBackground = JNIEnv.GetMethodID (class_ref, "loadInBackground", "()Landroid/database/Cursor;");
14 |
15 | if (GetType () == ThresholdType)
16 | return (Java.Lang.Object) Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (Handle, id_loadInBackground), JniHandleOwnership.TransferLocalRef);
17 | else
18 | return (Java.Lang.Object) Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (Handle, ThresholdClass, id_loadInBackground), JniHandleOwnership.TransferLocalRef);
19 | }
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Additions/CursorLoader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Runtime;
3 |
4 | namespace Android.Support.V4.Content {
5 |
6 | public partial class CursorLoader {
7 |
8 | static IntPtr id_loadInBackground;
9 | [Register ("loadInBackground", "()Landroid/database/Cursor;", "GetLoadInBackgroundHandler")]
10 | public override Java.Lang.Object LoadInBackground ()
11 | {
12 | if (id_loadInBackground == IntPtr.Zero)
13 | id_loadInBackground = JNIEnv.GetMethodID (class_ref, "loadInBackground", "()Landroid/database/Cursor;");
14 |
15 | if (GetType () == ThresholdType)
16 | return (Java.Lang.Object) Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (Handle, id_loadInBackground), JniHandleOwnership.TransferLocalRef);
17 | else
18 | return (Java.Lang.Object) Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (Handle, ThresholdClass, id_loadInBackground), JniHandleOwnership.TransferLocalRef);
19 | }
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapsDemo", "MapsDemo\MapsDemo.csproj", "{BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(MonoDevelopProperties) = preSolution
18 | StartupItem = MapsDemo\MapsDemo.csproj
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Mono.Android.Compatibility.v4.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Android.Compatibility.v4", "Mono.Android.Compatibility.v4.csproj", "{EBF565BD-392B-43DC-A91D-F9C879F0D427}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {EBF565BD-392B-43DC-A91D-F9C879F0D427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {EBF565BD-392B-43DC-A91D-F9C879F0D427}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {EBF565BD-392B-43DC-A91D-F9C879F0D427}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {EBF565BD-392B-43DC-A91D-F9C879F0D427}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/EnumMethods.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/Maps.fixup:
--------------------------------------------------------------------------------
1 |
2 | Android.GoogleMaps
3 |
4 |
14 | public
15 |
16 | Please use the Xamarin Component: http://components.xamarin.com/view/googleplayservices
17 | Please use the Xamarin Component: http://components.xamarin.com/view/googleplayservices
18 |
19 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/methodmap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Android.App;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("MapsDemo")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("atsushi")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 | [assembly: Application (Label = "Mono for Android MapsDemo", Icon = "@drawable/app_sample_code")]
29 | [assembly: UsesPermission (Name = "android.permission.ACCESS_COARSE_LOCATION")]
30 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/layout/mapview.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 |
20 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/MapViewDemo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | using Android.App;
18 | using Android.Content;
19 | using Android.OS;
20 | using Android.GoogleMaps;
21 |
22 | namespace MonoDroid.Samples.MapsDemo
23 | {
24 | // This demonstrates creating a Map based Activity.
25 | [Activity (Name = "com.example.monodroid.googleapis.maps.MapViewDemo", Label = "MapView")]
26 | [IntentFilter (new[] { Intent.ActionMain }, Categories = new string[] { Intent.CategorySampleCode })]
27 | public class MapViewDemo : MapActivity
28 | {
29 | protected override void OnCreate (Bundle savedInstanceState)
30 | {
31 | base.OnCreate (savedInstanceState);
32 | SetContentView (Resource.Layout.mapview);
33 | }
34 |
35 | protected override bool IsRouteDisplayed {
36 | get { return false; }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/Resource.designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace MonoDroid.Samples.MapsDemo
12 | {
13 |
14 |
15 | public partial class Resource
16 | {
17 |
18 | public partial class Attribute
19 | {
20 |
21 | private Attribute()
22 | {
23 | }
24 | }
25 |
26 | public partial class Drawable
27 | {
28 |
29 | // aapt resource value: 0x7f020000
30 | public const int app_sample_code = 2130837504;
31 |
32 | private Drawable()
33 | {
34 | }
35 | }
36 |
37 | public partial class Id
38 | {
39 |
40 | // aapt resource value: 0x7f050000
41 | public const int main = 2131034112;
42 |
43 | private Id()
44 | {
45 | }
46 | }
47 |
48 | public partial class Layout
49 | {
50 |
51 | // aapt resource value: 0x7f030000
52 | public const int mapview = 2130903040;
53 |
54 | private Layout()
55 | {
56 | }
57 | }
58 |
59 | public partial class String
60 | {
61 |
62 | // aapt resource value: 0x7f040000
63 | public const int activity_sample_code = 2130968576;
64 |
65 | private String()
66 | {
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle ("CompatibilityBindings")]
9 | [assembly: AssemblyDescription ("")]
10 | [assembly: AssemblyConfiguration ("")]
11 | [assembly: AssemblyCompany ("")]
12 | [assembly: AssemblyProduct ("CompatibilityBindings")]
13 | [assembly: AssemblyCopyright ("Copyright © 2012")]
14 | [assembly: AssemblyTrademark ("")]
15 | [assembly: AssemblyCulture ("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible (false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid ("a2573d90-f106-4f44-9b56-be9e7b09f699")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion ("1.0.0.0")]
36 | [assembly: AssemblyFileVersion ("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | monodroid-bindings
2 | ==================
3 |
4 | This module contains Mono for Android API bindings for popular Android
5 | libraries that developers can resuse in their own applications.
6 |
7 | If you would like to get your binding added, contact us.
8 |
9 | This also serves as a "HOWTO" for binding additional libraries.
10 |
11 |
12 | Building
13 | ========
14 |
15 | Building the bindings requires Mono for Android 4.2 or later.
16 |
17 | To build, run `make` in the toplevel directory:
18 |
19 | $ make
20 |
21 |
22 | License
23 | =======
24 |
25 | The bindings are licensed under the MIT X11 license:
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a copy
28 | of this software and associated documentation files (the "Software"), to deal
29 | in the Software without restriction, including without limitation the rights
30 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31 | copies of the Software, and to permit persons to whom the Software is
32 | furnished to do so, subject to the following conditions:
33 |
34 | The above copyright notice and this permission notice shall be included in
35 | all copies or substantial portions of the Software.
36 |
37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
43 | THE SOFTWARE.
44 |
45 | Authors
46 | =======
47 |
48 | * Atsushi Eno
49 | * Jonathan Pryor
50 |
51 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/configure:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | usage()
3 | {
4 | cat <config.log <> $CNF
32 | }
33 |
34 | sh_append()
35 | {
36 | printf "%s=%s\n" "$1" "$2" >> $SH
37 | }
38 |
39 | MONO_ANDROID_PATH="/Developer/MonoAndroid/usr"
40 | BUILDDIR="bin"
41 | API_LEVELS=8
42 |
43 | for arg; do
44 | case "$arg" in
45 | --help | -h)
46 | usage
47 | exit 1
48 | ;;
49 | --out=*)
50 | BUILDDIR=$(echo $arg|sed -e 's,.*=,,')
51 | ;;
52 | --with-mfa-path=*)
53 | MONO_ANDROID_PATH=$(echo $arg|sed -e 's,.*=,,')
54 | ;;
55 | --with-android-path=*)
56 | ANDROID_SDK_PATH=$(echo $arg|sed -e 's,.*=,,')
57 | ;;
58 | --api-levels=*)
59 | API_LEVELS=$(echo $arg|sed -e 's,.*=,,')
60 | ;;
61 | esac
62 | done
63 |
64 | if [ ! -d $ANDROID_SDK_PATH ]; then
65 | echo "----------------------------------------------";
66 | echo "Cannot find android sdk path.";
67 | echo "set the ANDROID_SDK_PATH env var";
68 | echo "----------------------------------------------";
69 | usage
70 | exit 1
71 | fi
72 |
73 |
74 | rm -f $CNF
75 | rm -f $SH
76 |
77 | cnf_append "ANDROID_SDK_PATH" "$ANDROID_SDK_PATH"
78 | sh_append "ANDROID_SDK_PATH" "$ANDROID_SDK_PATH"
79 | cnf_append "MONO_ANDROID_PATH" "$MONO_ANDROID_PATH"
80 | sh_append "MONO_ANDROID_PATH" "$MONO_ANDROID_PATH"
81 | cnf_append "API_LEVELS" "$API_LEVELS"
82 | sh_append "API_LEVELS" "$API_LEVELS"
83 | cnf_append "TOP" "$(pwd)"
84 | sh_append "TOP" "$(pwd)"
85 | cnf_append "BUILDDIR" "$(pwd)/$BUILDDIR"
86 | sh_append "BUILDDIR" "$(pwd)/$BUILDDIR"
87 | cat </dev/null
53 | mdoc export-msxdoc -o $@ obj/platform-$*/docs >/dev/null
54 |
55 | $(MCW_GEN):
56 | @echo "Building bindings requires Mono for Android 4.2 or later."
57 | exit 1
58 |
59 | $(JAR):
60 | @echo "Please install \"Extras > Android Support package\" within the \`android\` utility to build Compatibility-v13."
61 | @exit 1
62 |
63 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/Makefile:
--------------------------------------------------------------------------------
1 | MONO_ANDROID_PATH := /Developer/MonoAndroid/usr
2 | API_LEVELS := 8
3 | BUILDDIR := bin
4 | TOP := ../..
5 | thisdir := Compatibility-v4/bindings
6 |
7 | -include ../../env.config
8 | -include $(TOP)/mk/helper.mk
9 |
10 | MCW_GEN := $(MONO_ANDROID_PATH)/bin/mcw-gen
11 |
12 | platforms_dir := $(BUILDDIR)/platforms
13 |
14 | ASSEMBLIES = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.Support.v4.dll)
15 | DOCS = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.Support.v4.xml)
16 | JAR = android-support-v4.jar
17 |
18 | VPATH = $(ANDROID_SDK_PATH)/extras/android/support/v4/ $(ANDROID_SDK_PATH)/extras/android/compatibility/v4/
19 |
20 | all:: $(JARS) $(ASSEMBLIES) $(DOCS)
21 |
22 | clean::
23 | $(RM) -r $(ASSEMBLIES) obj
24 |
25 | SOURCES = \
26 | $(topdir)/src/Android.Support.V4.Content/CursorLoader.cs \
27 | $(topdir)/src/Android.Support.V4.Content/Loader.cs \
28 | $(topdir)/src/Android.Support.V4.View/ViewPager.cs \
29 | $(topdir)/src/Android.Support.V4.Widget/DrawerLayout.cs \
30 | $(topdir)/src/Android.Support.V4.Widget/SlidingPaneLayout.cs \
31 | src/AssemblyInfo.cs
32 |
33 | $(ASSEMBLIES): $(platforms_dir)/android-%/Mono.Android.Support.v4.dll: $(JAR) EnumFields.xml EnumMethods.xml Metadata.xml $(SOURCES) $(MCW_GEN)
34 | -mkdir -p $(platforms_dir)/android-$*
35 | -mkdir -p obj/platform-$*
36 | $(MCW_GEN) \
37 | -sdk-dir="$(ANDROID_SDK_PATH)" \
38 | -sdk-platform=19 \
39 | -jar=$< \
40 | -embed \
41 | -dll="$(platforms_dir)/android-$*/Mono.Android.Support.v4.dll" \
42 | -fixup=Metadata.xml \
43 | -enumfields=EnumFields.xml -enummethods=EnumMethods.xml -global -v \
44 | -o obj/platform-$* \
45 | -cscopt -debug+ -cscopt -nowarn:0109,0108,0618 $(SIGNOPTS:%=-cscopt %) \
46 | -droiddoc=$(ANDROID_SDK_PATH)/docs/reference \
47 | $(SOURCES:%=-cscopt "%")
48 |
49 | $(DOCS): $(platforms_dir)/android-%/Mono.Android.Support.v4.xml: $(platforms_dir)/android-%/Mono.Android.Support.v4.dll EnumFields.xml Metadata.xml
50 | $(RM) -R obj/platform-$*/docs
51 | -mkdir -p obj/platform-$*/docs
52 | -cp -R Documentation/en obj/platform-$*/docs
53 | mdoc update -o obj/platform-$*/docs $< -L $(MONO_ANDROID_PATH)/lib/mandroid/platforms/android-$* >/dev/null
54 | mdoc export-msxdoc -o $@ obj/platform-$*/docs >/dev/null
55 |
56 | $(MCW_GEN):
57 | @echo "Building bindings requires Mono for Android 4.2 or later."
58 | exit 1
59 |
60 | $(JAR):
61 | @echo "Please install \"Extras > Android Support package\" within the \`android\` utility to build Support-v4."
62 | @exit 1
63 |
64 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/MapViewCompassDemo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | using System;
18 | using Android.App;
19 | using Android.Content;
20 | using Android.Graphics;
21 | using Android.Hardware;
22 | using Android.OS;
23 | using Android.Views;
24 | using Android.GoogleMaps;
25 |
26 | // Example of how to use a MapsView in conjunction with the SensorManager
27 | namespace MonoDroid.Samples.MapsDemo
28 | {
29 | [Activity (Name = "com.example.monodroid.googleapis.maps.MapViewCompassDemo", Label = "MapView and Compass")]
30 | [IntentFilter (new[] { Intent.ActionMain }, Categories = new string[] { Intent.CategorySampleCode })]
31 | public class MapViewCompassDemo : MapActivity
32 | {
33 | const String TAG = "MapViewCompassDemo";
34 |
35 | private SensorManager sensor_manager;
36 | private RotateView rotate_view;
37 | private MyLocationOverlay location_overlay;
38 |
39 | protected override void OnCreate (Bundle savedInstanceState)
40 | {
41 | base.OnCreate (savedInstanceState);
42 |
43 | // Get a reference to the sensor manager
44 | sensor_manager = (SensorManager) GetSystemService (Context.SensorService);
45 |
46 | // Create our view
47 | var map_view = new MapView (this, "MapViewCompassDemo_DummyAPIKey");
48 |
49 | rotate_view = new RotateView (this);
50 | rotate_view.AddView (map_view);
51 |
52 | SetContentView (rotate_view);
53 |
54 | // Create the location overlay
55 | location_overlay = new MyLocationOverlay (this, map_view);
56 | location_overlay.RunOnFirstFix (delegate {
57 | map_view.Controller.AnimateTo (location_overlay.MyLocation);
58 | });
59 | map_view.Overlays.Add (location_overlay);
60 |
61 | map_view.Controller.SetZoom(18);
62 | map_view.Clickable = true;
63 | map_view.Enabled = true;
64 | }
65 |
66 | protected override void OnResume ()
67 | {
68 | base.OnResume ();
69 |
70 | sensor_manager.RegisterListener (rotate_view, SensorManager.SensorOrientation,SensorDelay.Ui);
71 |
72 | location_overlay.EnableMyLocation ();
73 | }
74 |
75 | protected override void OnStop ()
76 | {
77 | sensor_manager.UnregisterListener (rotate_view);
78 | location_overlay.DisableMyLocation ();
79 |
80 | base.OnStop ();
81 | }
82 |
83 | protected override bool IsRouteDisplayed {
84 | get { return false; }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Mono.Android.Compatibility.v4.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {EBF565BD-392B-43DC-A91D-F9C879F0D427}
9 | {10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | Mono.Android.Compatibility.v4
13 | Mono.Android.Compatibility.v4
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | Code
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | Designer
50 |
51 |
52 |
53 |
54 | Designer
55 |
56 |
57 | Designer
58 |
59 |
60 |
61 |
68 |
69 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/MapsDemo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.0
7 | 2.0
8 | {BA00AF85-F8BB-4869-A8C6-5FB424CF99D3}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | MonoDroid.Samples.MapsDemo
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Resources
16 | Assets
17 | MapsDemo
18 | Properties\AndroidManifest.xml
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug
25 | DEBUG;
26 | prompt
27 | 4
28 | None
29 | false
30 |
31 |
32 | none
33 | false
34 | bin\Release
35 | prompt
36 | 4
37 | false
38 | SdkOnly
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Mono.Android.Compatibility.v4/Transforms/Metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | android.support.v4.app.LoaderManager.LoaderCallbacks
23 | android.support.v4.app.LoaderManager.LoaderCallbacks
24 | android.support.v4.content.Loader
25 | android.support.v4.app.LoaderManager.LoaderCallbacks
26 | android.support.v4.app.LoaderManager.LoaderCallbacks
27 | android.support.v4.content.Loader
28 |
29 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv4-18
30 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv4-18
31 |
32 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/RotateView.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | using System;
18 | using Android.Content;
19 | using Android.Graphics;
20 | using Android.Hardware;
21 | using Android.Views;
22 |
23 | namespace MonoDroid.Samples.MapsDemo
24 | {
25 | class RotateView : ViewGroup, ISensorListener
26 | {
27 | const float SQ2 = 1.414213562373095f;
28 | const float ROTATE_TOLERANCE = 2.0f;
29 |
30 | private float heading = 0;
31 | private object lock_obj = new object ();
32 |
33 | public RotateView (Context context)
34 | : base (context)
35 | {
36 | }
37 |
38 | // When the sensor tells us we have moved, update
39 | public void OnSensorChanged (int sensor, float[] values)
40 | {
41 | lock (lock_obj) {
42 | if (Math.Abs (heading - values[0]) > ROTATE_TOLERANCE) {
43 | heading = values[0];
44 | Invalidate ();
45 | }
46 | }
47 | }
48 |
49 | // Rotate the canvas before drawing
50 | protected override void DispatchDraw (Canvas canvas)
51 | {
52 | canvas.Save (SaveFlags.Matrix);
53 | canvas.Rotate (-heading, Width * 0.5f, Height * 0.5f);
54 |
55 | base.DispatchDraw (canvas);
56 |
57 | canvas.Restore ();
58 | }
59 |
60 | protected override void OnLayout (bool changed, int l, int t, int r, int b)
61 | {
62 | int width = Width;
63 | int height = Height;
64 | int count = ChildCount;
65 |
66 | for (int i = 0; i < count; i++) {
67 | View view = GetChildAt (i);
68 |
69 | int childWidth = view.MeasuredWidth;
70 | int childHeight = view.MeasuredHeight;
71 | int childLeft = (width - childWidth) / 2;
72 | int childTop = (height - childHeight) / 2;
73 |
74 | view.Layout (childLeft, childTop, childLeft + childWidth, childTop + childHeight);
75 | }
76 | }
77 |
78 | protected override void OnMeasure (int widthMeasureSpec, int heightMeasureSpec)
79 | {
80 | int w = GetDefaultSize (SuggestedMinimumWidth, widthMeasureSpec);
81 | int h = GetDefaultSize (SuggestedMinimumHeight, heightMeasureSpec);
82 | int sizeSpec;
83 |
84 | if (w > h)
85 | sizeSpec = MeasureSpec.MakeMeasureSpec ((int)(w * SQ2), MeasureSpecMode.Exactly);
86 | else
87 | sizeSpec = MeasureSpec.MakeMeasureSpec ((int)(h * SQ2), MeasureSpecMode.Exactly);
88 |
89 | int count = ChildCount;
90 |
91 | for (int i = 0; i < count; i++)
92 | GetChildAt (i).Measure (sizeSpec, sizeSpec);
93 |
94 | base.OnMeasure (widthMeasureSpec, heightMeasureSpec);
95 | }
96 |
97 | public override bool DispatchTouchEvent (MotionEvent ev)
98 | {
99 | // TODO: rotate events too
100 | return base.DispatchTouchEvent (ev);
101 | }
102 |
103 | public void OnAccuracyChanged (int sensor, int accuracy)
104 | {
105 | // TODO Auto-generated method stub
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Compatibility-v13/bindings/Metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | android.support.v4.app.LoaderManager.LoaderCallbacks
24 | android.support.v4.app.LoaderManager.LoaderCallbacks
25 | android.support.v4.content.Loader
26 | android.support.v4.app.LoaderManager.LoaderCallbacks
27 | android.support.v4.app.LoaderManager.LoaderCallbacks
28 | android.support.v4.content.Loader
29 |
30 |
31 |
32 |
33 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv13-18
34 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv13-18
35 |
36 |
--------------------------------------------------------------------------------
/Compatibility-v4/bindings/Metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | android.support.v4.app.LoaderManager.LoaderCallbacks
24 | android.support.v4.app.LoaderManager.LoaderCallbacks
25 | android.support.v4.content.Loader
26 | android.support.v4.app.LoaderManager.LoaderCallbacks
27 | android.support.v4.app.LoaderManager.LoaderCallbacks
28 | android.support.v4.content.Loader
29 |
30 |
31 |
32 |
33 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv4-18
34 | Please use the Xamarin Component: http://components.xamarin.com/view/xamandroidsupportv4-18
35 |
36 |
--------------------------------------------------------------------------------
/GoogleMaps/bindings/Makefile:
--------------------------------------------------------------------------------
1 | MONO_ANDROID_PATH := /Developer/MonoAndroid/usr
2 | ANDROID_SDK_PATH := /opt/android/sdk
3 | API_LEVELS := 8
4 | BUILDDIR := bin
5 | TOP := ../..
6 | thisdir := GoogleMaps/bindings
7 |
8 | -include ../../env.config
9 | -include $(TOP)/mk/helper.mk
10 |
11 | SMCS := $(MONO_ANDROID_PATH)/bin/smcs
12 | MCW_GEN := $(MONO_ANDROID_PATH)/bin/mcw-gen
13 |
14 | platforms_dir := $(BUILDDIR)/platforms
15 |
16 | ASSEMBLIES = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.GoogleMaps.dll)
17 | DOCS = $(API_LEVELS:%=$(platforms_dir)/android-%/Mono.Android.GoogleMaps.xml)
18 |
19 | LEVELS = . . . 4 . . 7 8 . 10 . 12 . 14 15 16 17 18 19 20
20 |
21 | all:: $(ASSEMBLIES) $(DOCS)
22 |
23 | clean::
24 | $(RM) -r $(ASSEMBLIES) obj
25 |
26 | SOURCES = \
27 | src/AssemblyInfo.cs \
28 | src/Android.GoogleMaps/ItemizedOverlay.cs \
29 | src/Android.GoogleMaps/MapController.cs \
30 | src/Android.GoogleMaps/MyLocationOverlay.cs \
31 | src/Android.GoogleMaps/TrackballGestureDetector.cs
32 |
33 | define get-levels-to-merge
34 | $(filter-out .,$(wordlist 1, $(1), $(LEVELS)))
35 | endef
36 |
37 | define get-descriptions-to-merge
38 | $(patsubst %,obj/android-%/api.xml,$(call get-levels-to-merge,$(1)))
39 | endef
40 |
41 | define get-descriptions.in-to-merge
42 | $(patsubst %,obj/android-%/api.xml.in,$(call get-levels-to-merge,$(1)))
43 | endef
44 |
45 | API_DESCRIPTIONS_IN := $(call get-descriptions.in-to-merge,$(lastword $(API_LEVELS)))
46 | API_DESCRIPTIONS := $(call get-descriptions-to-merge,$(lastword $(API_LEVELS)))
47 |
48 | $(API_DESCRIPTIONS_IN): obj/android-%/api.xml.in: $(MCW_GEN)
49 | -mkdir -p obj/android-$*
50 | jar=`find $(ANDROID_SDK_PATH)/ -regex '.*addon-google_apis-google\(_inc_\)*-$*\(-[0-9]\)*/libs/maps.jar' | grep '\<$*\>'`;\
51 | if [ ! -f "$$jar" ]; then \
52 | echo "Please install the \"Android (API $(API_LEVELS)) > Google APIs by Google Inc.\" package within the \`android\` utility to build GoogleMaps." ; \
53 | exit 1; \
54 | fi ; \
55 | $(MCW_GEN) describe \
56 | -sdk-dir="$(ANDROID_SDK_PATH)" \
57 | -sdk-platform=$* \
58 | -javadoc="$$(ls -d `dirname "$$jar"`/../docs/maps_apis `dirname "$$jar"`/../docs/reference 2>/dev/null)" \
59 | -o "$@" \
60 | $$jar
61 |
62 | $(API_DESCRIPTIONS): obj/android-%/api.xml: $(call get-descriptions.in-to-merge,$(lastword $(API_LEVELS))) $(MCW_GEN)
63 | $(MCW_GEN) merge -v -o "$@" $(call get-descriptions.in-to-merge,$*)
64 |
65 | $(ASSEMBLIES): $(platforms_dir)/android-%/Mono.Android.GoogleMaps.dll: fieldmap.xml methodmap.xml Maps.fixup $(SOURCES) obj/android-%/api.xml $(MCW_GEN)
66 | -mkdir -p $(platforms_dir)/android-$*
67 | $(MCW_GEN) bind \
68 | --sdk-dir="$(ANDROID_SDK_PATH)" \
69 | --sdk-platform=$* \
70 | --assembly="$(notdir $@)" \
71 | --enumfields=fieldmap.xml \
72 | --enummethods=methodmap.xml \
73 | -fixup=Maps.fixup \
74 | --global -v \
75 | -i obj/android-$*/api.xml \
76 | -o obj/android-$*
77 | $(SMCS) -target:library -out:$@ -nowarn:0109,0108,0618 -debug+ obj/android-$*/src/generated/*.cs $(SOURCES) \
78 | -r:$(MONO_ANDROID_PATH)/lib/mandroid/platforms/android-$*/Mono.Android.dll $(SIGNOPTS)
79 |
80 | $(DOCS): $(platforms_dir)/android-%/Mono.Android.GoogleMaps.xml: $(platforms_dir)/android-%/Mono.Android.GoogleMaps.dll fieldmap.xml Maps.fixup
81 | $(RM) -R obj/android-$*/docs
82 | -mkdir -p obj/android-$*/docs
83 | -cp -R Documentation/en obj/android-$*/docs
84 | mdoc update -o obj/android-$*/docs $< -L $(MONO_ANDROID_PATH)/lib/mandroid/platforms/android-$* >/dev/null
85 | mdoc export-msxdoc -o $@ obj/android-$*/docs >/dev/null
86 |
87 | $(MCW_GEN):
88 | @echo "Building bindings requires Mono for Android 4.2 or later."
89 | exit 1
90 |
91 |
--------------------------------------------------------------------------------
/GoogleMaps/samples/MapsDemo/MapsDemo/MapsDemo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | using System;
18 | using System.Collections.Generic;
19 | using Android.App;
20 | using Android.Content;
21 | using Android.Content.PM;
22 | using Android.OS;
23 | using Android.Views;
24 | using Android.Widget;
25 |
26 | namespace MonoDroid.Samples.MapsDemo
27 | {
28 | [Activity (Name = "com.example.monodroid.googleapis.maps.MapsDemo", Label = "M4A MapsDemo", MainLauncher = true)]
29 | [IntentFilter (new[] { Intent.ActionMain }, Categories = new string[] { Intent.CategoryLauncher })]
30 | public class MapsDemo : ListActivity
31 | {
32 | protected override void OnCreate (Bundle savedInstanceState)
33 | {
34 | base.OnCreate (savedInstanceState);
35 |
36 | ListAdapter = new SimpleAdapter (this, GetData (),
37 | Android.Resource.Layout.SimpleListItem1, new String [] { "title" },
38 | new int[] { Android.Resource.Id.Text1 });
39 |
40 | ListView.TextFilterEnabled = true;
41 | }
42 |
43 | protected List> GetData ()
44 | {
45 | var myData = new List> ();
46 |
47 | Intent mainIntent = new Intent (Intent.ActionMain, null);
48 | mainIntent.AddCategory (Intent.CategorySampleCode);
49 |
50 | PackageManager pm = PackageManager;
51 | IList list = pm.QueryIntentActivities (mainIntent, 0);
52 |
53 | if (null == list)
54 | return myData;
55 |
56 | int len = list.Count;
57 |
58 | IDictionary entries = new Dictionary ();
59 |
60 | for (int i = 0; i < len; i++) {
61 | ResolveInfo info = list [i];
62 |
63 | var labelSeq = info.LoadLabel (pm);
64 |
65 | if ("com.example.monodroid.googleapis.maps" == info.ActivityInfo.ApplicationInfo.PackageName) {
66 | AddItem (myData, labelSeq.ToString (), ActivityIntent (
67 | info.ActivityInfo.ApplicationInfo.PackageName,
68 | info.ActivityInfo.Name));
69 | }
70 | }
71 |
72 | myData.Sort (delegate (IDictionary map1, IDictionary map2) {
73 | return String.Compare ((string) map1 ["title"], (string) map2 ["title"], StringComparison.CurrentCulture);
74 | });
75 |
76 | return myData;
77 | }
78 |
79 | protected Intent ActivityIntent (String pkg, String componentName)
80 | {
81 | Intent result = new Intent ();
82 | result.SetClassName (pkg, componentName);
83 | return result;
84 | }
85 |
86 | protected void AddItem (List> data, String name, Intent intent) {
87 | IDictionary temp = new Dictionary ();
88 | temp ["title"] = name;
89 | temp ["intent"] = intent;
90 | data.Add (temp);
91 | }
92 |
93 | protected override void OnListItemClick (ListView l, View v, int position, long id) {
94 | var map = (IDictionary) l.GetItemAtPosition (position);
95 |
96 | Intent intent = (Intent) map ["intent"];
97 | StartActivity (intent);
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/GoogleMaps/README.md:
--------------------------------------------------------------------------------
1 | Google Maps API binding
2 | =======================
3 |
4 | This is a binding generator sample for google maps API (maps.jar).
5 |
6 |
7 | Building
8 | ========
9 |
10 | To build this library, you have to first get Google maps API addon in
11 | the Android SDK. Once you get it, set the `ANDROID_SDK_PATH` environment
12 | variable to the installed SDK, and run `make` from within the bindings
13 | directory.
14 |
15 | make ANDROID_SDK_PATH=/opt/android/sdk
16 |
17 | Requirements
18 | ============
19 |
20 | Building the bindings requires:
21 |
22 | * Mono for Android 4.2 or later
23 | * The Google APIs Android SDK add-on
24 |
25 | Using the bindings requires:
26 |
27 | * A device which supports Google Maps
28 | * A Google Maps API key.
29 |
30 |
31 | Installing the Google APIs Android SDK add-on
32 | ---------------------------------------------
33 |
34 | The Google APIs require the "Google APIs" add-on library, which is provided
35 | for each API level. You need to download it for the API level you wish to
36 | target.
37 |
38 | To install the Google APIs Android SDK add-on:
39 |
40 | 1. Launch the Android SDK manager:
41 | `$ANDROID_SDK_PATH/tools/android`
42 | 2. Within the Android SDK manager, click Available packages
43 | in the left-hand pane.
44 | 3. In the right-hand pane, navigate to the tree view node Third party
45 | Add-ons /Google Inc. add-ons (dl-ssl.google.com)
46 | 4. Select the check-box for e.g. "Google APIs by Google Inc., Android API
47 | 8, revision 2".
48 | 5. Click the Install Selected button in the lower right corner.
49 | 6. In the "Choose Packages to Install" dialog, select the Accept
50 | radio button, then click the Install button.
51 |
52 |
53 | Creating a device with Google Maps support
54 | ------------------------------------------
55 |
56 | To verify that your target device has Google Maps support, you can use
57 | the following command to see if Google Maps support is present:
58 |
59 | $ $ANDROID_SDK_PATH/platform-tools/adb shell ls /system/framework/*map*
60 | /system/framework/com.google.android.maps.jar
61 | /system/framework/com.google.android.maps.odex
62 |
63 | The `com.google.android.maps.jar` library should be present on
64 | hardware devices, but may not be present within some emulators.
65 |
66 | If you need an emulator with Google Maps support:
67 |
68 | 1. Launch the Android AVD manager:
69 | `$ANDROID_SDK_PATH/tools/android avd`
70 | 2. Within the Android SDK and AVD manager, click Virtual devices
71 | in the left-hand pane.
72 | 3. Click the New... button on the right-hande side.
73 | 4. In the Create new Android Virtual Device (AVD) dialog, provide a
74 | name for the device (e.g. MAPS), and in the Target drop-down
75 | select the Google APIs (Google Inc.) - API Level 8 entry.
76 | 5. Click the Create AVD button.
77 |
78 | You may now launch the emulator with:
79 |
80 | `$ANDROID_SDK_PATH/tools/emulator -partition-size 512 -avd MAPS`
81 |
82 |
83 | Google Maps API Key
84 | -------------------
85 |
86 | Google Maps requires a per-app API key. You can obtain a maps API key from here:
87 | http://docs.xamarin.com/android/advanced_topics/Obtaining_a_Google_Maps_API_Key
88 |
89 | Once you obtained the key, you have to alter two parts of the sample sources to fully
90 | run the demo app:
91 |
92 | * in Resource/Layout/Main.axml, replace the `apiKey` attribute value with your API key.
93 | * in MapsDemo/MapsViewCompassDemo.cs, replace the second constructor parameter
94 | in OnCreate() method.
95 |
96 | If you see an empty beige grid, that means the MapsView is working, but you do not
97 | have a valid Maps API key.
98 |
99 |
100 | License
101 | =======
102 |
103 | The bindings are licensed under the MIT X11 license:
104 |
105 | Permission is hereby granted, free of charge, to any person obtaining a copy
106 | of this software and associated documentation files (the "Software"), to deal
107 | in the Software without restriction, including without limitation the rights
108 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
109 | copies of the Software, and to permit persons to whom the Software is
110 | furnished to do so, subject to the following conditions:
111 |
112 | The above copyright notice and this permission notice shall be included in
113 | all copies or substantial portions of the Software.
114 |
115 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
116 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
117 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
118 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
119 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
120 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
121 | THE SOFTWARE.
122 |
--------------------------------------------------------------------------------