Skip to content

Commit

Permalink
Merge branch 'hotfix/label-overlapping' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
eman1986 committed Oct 16, 2020
2 parents 49ac632 + 6414f9a commit f3f2b4b
Show file tree
Hide file tree
Showing 60 changed files with 10,488 additions and 503 deletions.
11 changes: 5 additions & 6 deletions NuGet/Package.Forms.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Microcharts.Forms</id>
<version>0.9.5.7</version>
<version>0.9.5.8</version>
<title>Microcharts for Xamarin.Forms</title>
<authors>Aloïs Deniel, Ed Lomonaco</authors>
<owners>Aloïs Deniel, Ed Lomonaco</owners>
Expand All @@ -14,12 +14,11 @@
<tags>xamarin.forms chart skia</tags>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="Microcharts" version="0.9.5.7" />
<dependency id="SkiaSharp" version="2.80.1" />
<dependency id="SkiaSharp.Views.Forms" version="2.80.1" />
<dependency id="Microcharts" version="0.9.5.8" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="SkiaSharp.Views.Forms" version="2.80.2" />
<dependency id="System.ValueTuple" version="4.5.0" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
<dependency id="Xamarin.Forms" version="4.7.0.1179" />
<dependency id="Xamarin.Forms" version="4.7.0.1351" />
</group>
</dependencies>
</metadata>
Expand Down
26 changes: 10 additions & 16 deletions NuGet/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Microcharts</id>
<version>0.9.5.7</version>
<version>0.9.5.8</version>
<title>Microcharts</title>
<authors>Aloïs Deniel, Ed Lomonaco</authors>
<owners>Aloïs Deniel, Ed Lomonaco</owners>
Expand All @@ -14,30 +14,24 @@
<tags>xamarin ios android chart skia</tags>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="HarfBuzzSharp" version="2.6.1.6" />
<dependency id="SkiaSharp" version="2.80.1" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="System.ValueTuple" version="4.5.0" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
</group>
<group targetFramework="monoandroid1.0">
<dependency id="HarfBuzzSharp" version="2.6.1.6" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
<dependency id="SkiaSharp.Views" version="2.80.1" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="SkiaSharp.Views" version="2.80.2" />
</group>
<group targetFramework="xamarinios1.0">
<dependency id="HarfBuzzSharp" version="2.6.1.6" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
<dependency id="SkiaSharp.Views" version="2.80.1" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="SkiaSharp.Views" version="2.80.2" />
</group>
<group targetFramework="uap10.0">
<dependency id="HarfBuzzSharp" version="2.6.1.6" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
<dependency id="SkiaSharp.Views" version="2.80.1" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="SkiaSharp.Views" version="2.80.2" />
</group>
<group targetFramework="xamarinmac2.0">
<dependency id="HarfBuzzSharp" version="2.6.1.6" />
<dependency id="Topten.RichTextKit" version="0.3.129" />
<dependency id="SkiaSharp.Views" version="2.80.1" />
<dependency id="SkiaSharp" version="2.80.2" />
<dependency id="SkiaSharp.Views" version="2.80.2" />
</group>
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Microcharts.Droid/Microcharts.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<AndroidResource Include="Resources\values\Strings.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.80.1" />
<PackageReference Include="SkiaSharp.Views" Version="2.80.1" />
<PackageReference Include="SkiaSharp" Version="2.80.2" />
<PackageReference Include="SkiaSharp.Views" Version="2.80.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microcharts\Microcharts.csproj">
Expand Down
5 changes: 3 additions & 2 deletions Sources/Microcharts.Forms/Microcharts.Forms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.80.1" />
<PackageReference Include="Xamarin.Forms" Version="4.7.0.1179" />
<PackageReference Include="SkiaSharp" Version="2.80.2" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.80.2" />
<PackageReference Include="Xamarin.Forms" Version="4.7.0.1351" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microcharts\Microcharts.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
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);
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

InputStream input = Assets.Open ("my_asset.txt");
}
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");
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using Android.App;
using Android.App;
using Android.OS;
using AndroidX.AppCompat.App;
using Microcharts.Droid;

namespace Microcharts.Samples.Droid
namespace Microcharts.Samples.Android
{
[Activity(Label = "Microcharts", MainLauncher = true, Icon = "@mipmap/icon")]
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
SetContentView(Resource.Layout.activity_main);

var charts = Data.CreateQuickstart();

Expand All @@ -24,4 +23,3 @@ protected override void OnCreate(Bundle savedInstanceState)
}
}
}

135 changes: 135 additions & 0 deletions Sources/Microcharts.Samples.Android/Microcharts.Samples.Android.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CC996DF4-E262-45B8-A450-D1E881FBE54D}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{122416d6-6b49-4ee2-a1e8-b825f31c79fe}</TemplateGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microcharts.Samples.Android</RootNamespace>
<AssemblyName>Microcharts.Samples.Android</AssemblyName>
<FileAlignment>512</FileAlignment>
<Deterministic>True</Deterministic>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
<Reference Include="Xamarin.AndroidX.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\Users\elomo\.nuget\packages\xamarin.androidx.appcompat\1.1.0.1\lib\monoandroid90\Xamarin.AndroidX.AppCompat.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\activity_main.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\values\ic_launcher_background.xml" />
<AndroidResource Include="Resources\values\strings.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_round.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_round.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.80.2" />
<PackageReference Include="SkiaSharp.Views" Version="2.80.2" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.2.0.4" />
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.1.0.5" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microcharts.Droid\Microcharts.Droid.csproj">
<Project>{18125022-45e6-46ec-855c-b36e4d41484d}</Project>
<Name>Microcharts.Droid</Name>
</ProjectReference>
<ProjectReference Include="..\Microcharts.Samples\Microcharts.Samples.csproj">
<Project>{6fbe798d-bb43-4bb5-9c61-d6dd5b0e623a}</Project>
<Name>Microcharts.Samples</Name>
</ProjectReference>
<ProjectReference Include="..\Microcharts\Microcharts.csproj">
<Project>{d07d3e94-e645-4035-a142-5f933a15d585}</Project>
<Name>Microcharts</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
10 changes: 10 additions & 0 deletions Sources/Microcharts.Samples.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
package="com.companyname.microcharts.samples.android">
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="29" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
26 changes: 26 additions & 0 deletions Sources/Microcharts.Samples.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microcharts.Samples.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Microcharts.Samples.Android")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.

For example, a sample Android app that contains a user interface layout (main.axml),
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:

Expand All @@ -12,7 +12,7 @@ Resources/
icon.png

layout/
main.axml
main.xml

values/
strings.xml
Expand Down Expand Up @@ -40,5 +40,5 @@ public class R {
}

You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
to reference the layout/main.xml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
Loading

0 comments on commit f3f2b4b

Please sign in to comment.