Skip to content

Commit 92c9be4

Browse files
committed
Add project files.
1 parent dd1fa45 commit 92c9be4

File tree

8 files changed

+220
-0
lines changed

8 files changed

+220
-0
lines changed

CircleProgressBar-droid.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.15
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Naxam.CircleProgressBar.Droid", "Naxam.CircleProgressBar.Droid\Naxam.CircleProgressBar.Droid.csproj", "{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Additions allow you to add arbitrary C# to the generated classes
2+
before they are compiled. This can be helpful for providing convenience
3+
methods or adding pure C# classes.
4+
5+
== Adding Methods to Generated Classes ==
6+
7+
Let's say the library being bound has a Rectangle class with a constructor
8+
that takes an x and y position, and a width and length size. It will look like
9+
this:
10+
11+
public partial class Rectangle
12+
{
13+
public Rectangle (int x, int y, int width, int height)
14+
{
15+
// JNI bindings
16+
}
17+
}
18+
19+
Imagine we want to add a constructor to this class that takes a Point and
20+
Size structure instead of 4 ints. We can add a new file called Rectangle.cs
21+
with a partial class containing our new method:
22+
23+
public partial class Rectangle
24+
{
25+
public Rectangle (Point location, Size size) :
26+
this (location.X, location.Y, size.Width, size.Height)
27+
{
28+
}
29+
}
30+
31+
At compile time, the additions class will be added to the generated class
32+
and the final assembly will a Rectangle class with both constructors.
33+
34+
35+
== Adding C# Classes ==
36+
37+
Another thing that can be done is adding fully C# managed classes to the
38+
generated library. In the above example, let's assume that there isn't a
39+
Point class available in Java or our library. The one we create doesn't need
40+
to interact with Java, so we'll create it like a normal class in C#.
41+
42+
By adding a Point.cs file with this class, it will end up in the binding library:
43+
44+
public class Point
45+
{
46+
public int X { get; set; }
47+
public int Y { get; set; }
48+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This directory is for Android .jars.
2+
3+
There are 2 types of jars that are supported:
4+
5+
== Input Jar ==
6+
7+
This is the jar that bindings should be generated for.
8+
9+
For example, if you were binding the Google Maps library, this would
10+
be Google's "maps.jar".
11+
12+
Set the build action for these jars in the properties page to "InputJar".
13+
14+
15+
== Reference Jars ==
16+
17+
These are jars that are referenced by the input jar. C# bindings will
18+
not be created for these jars. These jars will be used to resolve
19+
types used by the input jar.
20+
21+
NOTE: Do not add "android.jar" as a reference jar. It will be added automatically
22+
based on the Target Framework selected.
23+
24+
Set the build action for these jars in the properties page to "ReferenceJar".
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{843B8BA3-53F4-43E9-9E90-4C3B11DF7588}</ProjectGuid>
9+
<ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<OutputType>Library</OutputType>
11+
<AppDesignerFolder>Properties</AppDesignerFolder>
12+
<RootNamespace>Naxam.CircleProgressBar.Droid</RootNamespace>
13+
<AssemblyName>Naxam.CircleProgressBar.Droid</AssemblyName>
14+
<FileAlignment>512</FileAlignment>
15+
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
16+
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="Mono.Android" />
37+
<Reference Include="System" />
38+
<Reference Include="System.Core" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<Compile Include="Properties\AssemblyInfo.cs" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<None Include="Jars\AboutJars.txt" />
45+
<None Include="Additions\AboutAdditions.txt" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<TransformFile Include="Transforms\Metadata.xml" />
49+
<TransformFile Include="Transforms\EnumFields.xml" />
50+
<TransformFile Include="Transforms\EnumMethods.xml" />
51+
</ItemGroup>
52+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
53+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
54+
Other similar extension points exist, see Microsoft.Common.targets.
55+
<Target Name="BeforeBuild">
56+
</Target>
57+
<Target Name="AfterBuild">
58+
</Target>
59+
-->
60+
</Project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using Android.App;
5+
6+
// General Information about an assembly is controlled through the following
7+
// set of attributes. Change these attribute values to modify the information
8+
// associated with an assembly.
9+
[assembly: AssemblyTitle("Naxam.CircleProgressBar.Droid")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("")]
13+
[assembly: AssemblyProduct("Naxam.CircleProgressBar.Droid")]
14+
[assembly: AssemblyCopyright("Copyright © 2017")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
[assembly: ComVisible(false)]
18+
19+
// Version information for an assembly consists of the following four values:
20+
//
21+
// Major Version
22+
// Minor Version
23+
// Build Number
24+
// Revision
25+
//
26+
// You can specify all the values or you can default the Build and Revision Numbers
27+
// by using the '*' as shown below:
28+
// [assembly: AssemblyVersion("1.0.*")]
29+
[assembly: AssemblyVersion("1.0.0.0")]
30+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<enum-field-mappings>
2+
<!--
3+
This example converts the constants Fragment_id, Fragment_name,
4+
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
5+
to an enum called Android.Support.V4.App.FragmentTagType with values
6+
Id, Name, and Tag.
7+
8+
<mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType">
9+
<field jni-name="Fragment_name" clr-name="Name" value="0" />
10+
<field jni-name="Fragment_id" clr-name="Id" value="1" />
11+
<field jni-name="Fragment_tag" clr-name="Tag" value="2" />
12+
</mapping>
13+
-->
14+
</enum-field-mappings>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<enum-method-mappings>
2+
<!--
3+
This example changes the Java method:
4+
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
5+
to be:
6+
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
7+
when bound in C#.
8+
9+
<mapping jni-class="android/support/v4/app/Fragment.SavedState">
10+
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
11+
</mapping>
12+
-->
13+
</enum-method-mappings>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<metadata>
2+
<!--
3+
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
4+
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
5+
6+
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
7+
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
8+
-->
9+
</metadata>

0 commit comments

Comments
 (0)