1
0
Форкнуть 0

FastRenderersPerformance sample

This commit is contained in:
Javier Suárez Ruiz 2019-05-25 13:33:25 +02:00
Родитель 9c1d9ecaf4
Коммит 03542ec463
38 изменённых файлов: 13253 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,189 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastRenderersPerformance.Android", "FastRenderersPerformance\FastRenderersPerformance.Android\FastRenderersPerformance.Android.csproj", "{4FC57032-071A-4E3B-B162-2919FA886BA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastRenderersPerformance", "FastRenderersPerformance\FastRenderersPerformance\FastRenderersPerformance.csproj", "{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|ARM = Ad-Hoc|ARM
Ad-Hoc|iPhone = Ad-Hoc|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
Ad-Hoc|x64 = Ad-Hoc|x64
Ad-Hoc|x86 = Ad-Hoc|x86
AppStore|Any CPU = AppStore|Any CPU
AppStore|ARM = AppStore|ARM
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
AppStore|x64 = AppStore|x64
AppStore|x86 = AppStore|x86
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|Any CPU.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|ARM.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|ARM.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|ARM.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhone.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhone.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x64.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x64.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x64.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x86.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x86.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.AppStore|x86.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|ARM.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|ARM.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhone.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x64.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x64.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x64.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x86.ActiveCfg = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x86.Build.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Debug|x86.Deploy.0 = Debug|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|Any CPU.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|Any CPU.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|ARM.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|ARM.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|ARM.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhone.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhone.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhone.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x64.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x64.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x64.Deploy.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x86.ActiveCfg = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x86.Build.0 = Release|Any CPU
{4FC57032-071A-4E3B-B162-2919FA886BA4}.Release|x86.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|Any CPU.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|ARM.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhone.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x64.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Ad-Hoc|x86.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|Any CPU.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|ARM.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|ARM.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhone.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhone.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x64.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x64.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x64.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x86.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x86.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.AppStore|x86.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|ARM.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|ARM.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|ARM.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhone.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x64.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x64.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x64.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x86.ActiveCfg = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x86.Build.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Debug|x86.Deploy.0 = Debug|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|Any CPU.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|Any CPU.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|ARM.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|ARM.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|ARM.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhone.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhone.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhone.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x64.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x64.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x64.Deploy.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x86.ActiveCfg = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x86.Build.0 = Release|Any CPU
{5E12F4DE-3FB6-4E88-902A-ADC3AEBB2D33}.Release|x86.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5C19AFE9-EF1A-4BC3-9EEB-4189F95D713C}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -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 you 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");

Просмотреть файл

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4FC57032-071A-4E3B-B162-2919FA886BA4}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>FastRenderersPerformance.Droid</RootNamespace>
<AssemblyName>FastRenderersPerformance.Android</AssemblyName>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<AotAssemblies>true</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AotAssemblies>true</AotAssemblies>
<EnableLLVM>true</EnableLLVM>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.0.0.346134-pre9" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.0.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="Helpers\ProfilerTimeHelper.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\ProfilerService.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable-hdpi\" />
<Folder Include="Resources\drawable-xhdpi\" />
<Folder Include="Resources\drawable-xxhdpi\" />
<Folder Include="Resources\drawable-xxxhdpi\" />
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FastRenderersPerformance\FastRenderersPerformance.csproj">
<Project>{5A23FFB8-43FF-4C1A-9ABC-F52E873DF3D2}</Project>
<Name>FastRenderersPerformance</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,67 @@
using Java.IO;
using Java.Lang;
using System;
using System.Globalization;
namespace FastRenderersPerformance.Droid.Helpers
{
// Based on: https://github.com/toomasz/XamarinAppStartupTime
// By Tomasz Ścisłowicz
public class ProfilerTimeHelper
{
const string LogcatTimeFormat = "yyyy-MM-dd HH:mm:ss.fff";
private static DateTime? StartupTime;
private static bool _attemptedToGetStartupTime;
public static DateTime? GetAppStartupTime()
{
if (_attemptedToGetStartupTime)
{
return StartupTime;
}
if (!StartupTime.HasValue)
{
StartupTime = GetStartupTimeFromLogcat();
_attemptedToGetStartupTime = true;
}
return StartupTime;
}
private static DateTime? GetStartupTimeFromLogcat()
{
var pid = Android.OS.Process.MyPid();
var process = new ProcessBuilder().
RedirectErrorStream(true).
Command("/system/bin/logcat", $"--pid={pid}", "-m", "1", "-v", "year").Start();
using (var bufferedReader = new BufferedReader(new InputStreamReader(process.InputStream)))
{
string line = null;
while ((line = bufferedReader.ReadLine()) != null)
{
if (ParseLogDateTime(line, out DateTime date))
{
return date;
}
}
}
return null;
}
private static bool ParseLogDateTime(string logLine, out DateTime dateTime)
{
if (logLine.Length < LogcatTimeFormat.Length)
{
dateTime = new DateTime();
return false;
}
var timeStr = logLine.Substring(0, LogcatTimeFormat.Length);
return DateTime.TryParseExact(timeStr, LogcatTimeFormat,
CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out dateTime);
}
}
}

Просмотреть файл

@ -0,0 +1,46 @@
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
using Xamarin.Forms;
using FastRenderersPerformance.Droid.Services;
namespace FastRenderersPerformance.Droid
{
[Activity(
Label = "FastRenderersPerformance",
Icon = "@mipmap/icon",
Theme = "@style/MainTheme",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
public MainActivity()
{
ProfilerService.RegisterInternalEvent("MainActivity Constructor");
}
protected override void OnCreate(Bundle savedInstanceState)
{
ProfilerService.RegisterInternalEvent("MainActivity OnCreate Init");
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Forms.SetFlags("FastRenderers_Experimental");
Forms.Init(this, savedInstanceState);
DependencyService.Register<ProfilerService>();
LoadApplication(new App());
ProfilerService.RegisterInternalEvent("MainActivity OnCreate End");
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="FastRenderersPerformance.Android"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

Просмотреть файл

@ -0,0 +1,33 @@
using System.Reflection;
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("FastRenderersPerformance.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FastRenderersPerformance.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[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
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

Просмотреть файл

@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
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.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:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="fixed" />

Просмотреть файл

@ -0,0 +1,9 @@
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 51 KiB

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launcher_background">#FFFFFF</color>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

Просмотреть файл

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FastRenderersPerformance.Droid.Helpers;
using FastRenderersPerformance.Services;
namespace FastRenderersPerformance.Droid.Services
{
public class ProfilerService : IProfilerService
{
private static Dictionary<string, DateTime?> _eventTimingsSinceStartup = new Dictionary<string, DateTime?>();
public static void RegisterInternalEvent(string eventName)
{
if (_eventTimingsSinceStartup.ContainsKey(eventName))
{
return;
}
_eventTimingsSinceStartup.Add(eventName, DateTime.Now);
}
public void RegisterEvent(string eventName)
{
RegisterInternalEvent(eventName);
}
public async Task<Dictionary<string, TimeSpan?>> GetTimingsSinceStartup()
{
return await Task.Factory.StartNew(() =>
{
var timings = new Dictionary<string, TimeSpan?>();
var startupTime = ProfilerTimeHelper.GetAppStartupTime();
foreach (var eventInfo in _eventTimingsSinceStartup)
{
timings.Add(eventInfo.Key, eventInfo.Value - startupTime);
}
return timings;
});
}
public DateTime? GetStartupTime()
{
return ProfilerTimeHelper.GetAppStartupTime();
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="FastRenderersPerformance.App">
<Application.Resources>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,36 @@
using FastRenderersPerformance.Services;
using FastRenderersPerformance.Views;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace FastRenderersPerformance
{
public partial class App : Application
{
public static IProfilerService ProfilerService { get; set; } = DependencyService.Get<IProfilerService>();
public App()
{
ProfilerService.RegisterEvent("Xamarin.Forms App Constructor Init");
InitializeComponent();
MainPage = new MainView();
ProfilerService.RegisterEvent("Xamarin.Forms App Constructor End");
}
protected override void OnStart()
{
ProfilerService.RegisterEvent("Xamarin.Forms App OnStart");
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}

Просмотреть файл

@ -0,0 +1,7 @@
namespace FastRenderersPerformance
{
public class AppSettings
{
public static int NumberOfMonkeys = 1000;
}
}

Просмотреть файл

@ -0,0 +1,48 @@
using System;
namespace FastRenderersPerformance.Extensions
{
public static class TimeSpanExtensions
{
public static string ToCanonicString(this TimeSpan? timeSpan)
{
if (!timeSpan.HasValue)
{
return "-";
}
return timeSpan.Value.ToCanonicString();
}
public static string ToCanonicString(this TimeSpan timeSpan, int secondsToSkipMsPart = 40)
{
int totalDays = (int)timeSpan.TotalDays;
if (totalDays > 0)
{
return $"{totalDays}d{timeSpan.Hours}h{timeSpan.Minutes}m{timeSpan.Seconds}s";
}
if (timeSpan.Hours > 0)
{
return $"{timeSpan.Hours}h{timeSpan.Minutes}m{timeSpan.Seconds}s";
}
if (timeSpan.Minutes > 0)
{
return $"{timeSpan.Minutes}m{timeSpan.Seconds}s";
}
if (timeSpan.Seconds < 1)
{
return $"{timeSpan.Milliseconds}ms";
}
if (timeSpan.Seconds < secondsToSkipMsPart)
{
return $"{timeSpan.Seconds}s{timeSpan.Milliseconds}ms";
}
return $"{timeSpan.Seconds}s";
}
}
}

Просмотреть файл

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LiveXAML" Version="2.1.72" />
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
<PackageReference Include="Xamarin.Forms" Version="3.6.0.344457" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Views\MainView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
namespace FastRenderersPerformance.Models
{
public class Monkey
{
public string Name { get; set; }
public string Location { get; set; }
public string Details { get; set; }
public string Image { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,17 @@
using FastRenderersPerformance.Extensions;
using System;
namespace FastRenderersPerformance.Models
{
public class Timing
{
public Timing(string eventName, TimeSpan? elapsedTime)
{
EventName = eventName;
ElapsedTime = elapsedTime?.ToCanonicString();
}
public string EventName { get; }
public string ElapsedTime { get; }
}
}

Просмотреть файл

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace FastRenderersPerformance.Services
{
public interface IProfilerService
{
void RegisterEvent(string eventName);
Task<Dictionary<string, TimeSpan?>> GetTimingsSinceStartup();
DateTime? GetStartupTime();
}
}

Просмотреть файл

@ -0,0 +1,90 @@
using FastRenderersPerformance.Models;
using System.Collections.Generic;
namespace FastRenderersPerformance.Services
{
public class MonkeyService
{
public static List<Monkey> GetMonkeys()
{
var monkeys = new List<Monkey>();
for (int i = 0; i < AppSettings.NumberOfMonkeys / 9; i++)
{
monkeys.Add(new Monkey
{
Name = "Baboon",
Location = "Africa & Asia",
Details = "Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
});
monkeys.Add(new Monkey
{
Name = "Capuchin Monkey",
Location = "Central & South America",
Details = "The capuchin monkeys are New World monkeys of the subfamily Cebinae. Prior to 2011, the subfamily contained only a single genus, Cebus.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Capuchin_Costa_Rica.jpg/200px-Capuchin_Costa_Rica.jpg"
});
monkeys.Add(new Monkey
{
Name = "Blue Monkey",
Location = "Central and East Africa",
Details = "The blue monkey or diademed monkey is a species of Old World monkey native to Central and East Africa, ranging from the upper Congo River basin east to the East African Rift and south to northern Angola and Zambia",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/BlueMonkey.jpg/220px-BlueMonkey.jpg"
});
monkeys.Add(new Monkey
{
Name = "Squirrel Monkey",
Location = "Central & South America",
Details = "The squirrel monkeys are the New World monkeys of the genus Saimiri. They are the only genus in the subfamily Saimirinae. The name of the genus Saimiri is of Tupi origin, and was also used as an English name by early researchers.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Saimiri_sciureus-1_Luc_Viatour.jpg/220px-Saimiri_sciureus-1_Luc_Viatour.jpg"
});
monkeys.Add(new Monkey
{
Name = "Golden Lion Tamarin",
Location = "Brazil",
Details = "The golden lion tamarin also known as the golden marmoset, is a small New World monkey of the family Callitrichidae.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Golden_lion_tamarin_portrait3.jpg/220px-Golden_lion_tamarin_portrait3.jpg"
});
monkeys.Add(new Monkey
{
Name = "Howler Monkey",
Location = "South America",
Details = "Howler monkeys are among the largest of the New World monkeys. Fifteen species are currently recognised. Previously classified in the family Cebidae, they are now placed in the family Atelidae.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Alouatta_guariba.jpg/200px-Alouatta_guariba.jpg"
});
monkeys.Add(new Monkey
{
Name = "Japanese Macaque",
Location = "Japan",
Details = "The Japanese macaque, is a terrestrial Old World monkey species native to Japan. They are also sometimes known as the snow monkey because they live in areas where snow covers the ground for months each",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Macaca_fuscata_fuscata1.jpg/220px-Macaca_fuscata_fuscata1.jpg"
});
monkeys.Add(new Monkey
{
Name = "Mandrill",
Location = "Southern Cameroon, Gabon, Equatorial Guinea, and Congo",
Details = "The mandrill is a primate of the Old World monkey family, closely related to the baboons and even more closely to the drill. It is found in southern Cameroon, Gabon, Equatorial Guinea, and Congo.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Mandrill_at_san_francisco_zoo.jpg/220px-Mandrill_at_san_francisco_zoo.jpg"
});
monkeys.Add(new Monkey
{
Name = "Proboscis Monkey",
Location = "Borneo",
Details = "The proboscis monkey or long-nosed monkey, known as the bekantan in Malay, is a reddish-brown arboreal Old World monkey that is endemic to the south-east Asian island of Borneo.",
Image = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Proboscis_Monkey_in_Borneo.jpg/250px-Proboscis_Monkey_in_Borneo.jpg"
});
}
return monkeys;
}
}
}

Просмотреть файл

@ -0,0 +1,65 @@
using FastRenderersPerformance.Models;
using FastRenderersPerformance.Services;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace FastRenderersPerformance.ViewModels
{
public class MainViewModel : BindableObject
{
private string _startupTime;
private List<Timing> _timings;
private List<Monkey> _monkeys;
private readonly IProfilerService _profilerService;
public MainViewModel(IProfilerService profilerService)
{
_profilerService = profilerService;
}
public string StartupTime
{
get => _startupTime;
set
{
_startupTime = value;
OnPropertyChanged();
}
}
public List<Timing> Timings
{
get => _timings;
set
{
_timings = value;
OnPropertyChanged();
}
}
public List<Monkey> Monkeys
{
get => _monkeys;
set
{
_monkeys = value;
OnPropertyChanged();
}
}
public async Task LoadDataAsync()
{
Monkeys = MonkeyService.GetMonkeys();
StartupTime = _profilerService.GetStartupTime()?.ToLocalTime().ToString() ?? "-";
var timings = await _profilerService.GetTimingsSinceStartup();
Timings = timings
.Select(t => new Timing(t.Key, t.Value))
.ToList();
}
}
}

Просмотреть файл

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="FastRenderersPerformance.Views.MainView">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="200" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Text="Performance Results"
FontSize="18"
Margin="10"/>
<Frame
Grid.Row="1"
Padding="10">
<StackLayout>
<StackLayout Orientation="Horizontal">
<Label
Text="App Startup Time:"
FontSize="12"
WidthRequest="100"/>
<Label
FontSize="12"
FontAttributes="Bold"
Text="{Binding StartupTime}"/>
</StackLayout>
<Label
Text="Timings since startup:"
FontSize="12"
FontAttributes="Bold"/>
<ListView
ItemsSource="{Binding Timings}"
SelectionMode="None"
SeparatorVisibility="None"
HasUnevenRows="True"
Margin="10,0,0,0">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout
Orientation="Horizontal"
HeightRequest="18">
<Label
Text="{Binding EventName}"
FontSize="12"
VerticalOptions="Center"
WidthRequest="220"/>
<Label
Text="{Binding ElapsedTime}"
FontSize="12"
VerticalOptions="Center"
FontAttributes="Bold"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</Frame>
<Label
Grid.Row="2"
Text="Sample View"
FontSize="18"
Margin="10"/>
<Frame
Grid.Row="3"
Padding="10">
<ScrollView>
<StackLayout
BindableLayout.ItemsSource="{Binding Monkeys}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Grid
Padding="10"
RowSpacing="10"
ColumnSpacing="10"
CompressedLayout.IsHeadless="true">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image
HeightRequest="66"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
Aspect="AspectFill"
WidthRequest="66"
Grid.RowSpan="2"
Source="{Binding Image}"/>
<Label
Grid.Column="1"
Text="{Binding Name}"
VerticalOptions="End"/>
<Label
Grid.Column="1"
Grid.Row="1"
VerticalOptions="Start"
Text="{Binding Location}"/>
</Grid>
</DataTemplate>
</BindableLayout.ItemTemplate>
</StackLayout>
</ScrollView>
</Frame>
</Grid>
</ContentPage.Content>
</ContentPage>

Просмотреть файл

@ -0,0 +1,22 @@
using FastRenderersPerformance.Services;
using FastRenderersPerformance.ViewModels;
using Xamarin.Forms;
namespace FastRenderersPerformance.Views
{
public partial class MainView : ContentPage
{
public MainView ()
{
InitializeComponent ();
BindingContext = new MainViewModel(DependencyService.Get<IProfilerService>());
}
protected override async void OnAppearing()
{
base.OnAppearing();
await (BindingContext as MainViewModel).LoadDataAsync();
App.ProfilerService.RegisterEvent("Xamarin.Forms MainView OnAppearing");
}
}
}