-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the initial Uno implementations, code pulled from: - https://github.com/unoplatform/Uno.SkiaSharp - #1333 Co-authored-by: Jérôme Laban <[email protected]> Co-authored-by: Geoffrey Huntley <[email protected]> Co-authored-by: Martin Zikmund <[email protected]>
- Loading branch information
1 parent
c540eb8
commit 4bc170c
Showing
150 changed files
with
3,742 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package> | ||
<metadata> | ||
|
||
<!-- package --> | ||
<id>SkiaSharp.Views.Uno</id> | ||
<title>SkiaSharp for Uno Platform</title> | ||
<version>1.0.0</version> | ||
<description> | ||
SkiaSharp for Uno Platform is a set of views that can be used to draw on the screen. | ||
</description> | ||
<summary> | ||
SkiaSharp for Uno Platform is a set of views that can be used to draw on the screen. | ||
</summary> | ||
<releaseNotes> | ||
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes. | ||
</releaseNotes> | ||
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl> | ||
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl> | ||
<tags>ui uno xamarin graphics ios android windows uwp macos cross-platform skiasharp</tags> | ||
|
||
<!-- legal --> | ||
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl> | ||
<authors>Microsoft</authors> | ||
<owners>Microsoft</owners> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<copyright>© Microsoft Corporation. All rights reserved.</copyright> | ||
|
||
<dependencies> | ||
<group targetFramework="monoandroid1.0"> | ||
<dependency id="Uno.UI" version="2.0.532" /> | ||
<dependency id="SkiaSharp" version="1.0.0" /> | ||
</group> | ||
<group targetFramework="xamarinios1.0"> | ||
<dependency id="Uno.UI" version="2.0.532" /> | ||
<dependency id="SkiaSharp" version="1.0.0" /> | ||
</group> | ||
<group targetFramework="xamarinmac2.0"> | ||
<dependency id="Uno.UI" version="2.0.532" /> | ||
<dependency id="SkiaSharp" version="1.0.0" /> | ||
</group> | ||
<group targetFramework="uap10.0"> | ||
<dependency id="Uno.UI" version="2.0.532" /> | ||
<dependency id="SkiaSharp" version="1.0.0" /> | ||
<dependency id="SkiaSharp.Views" version="1.0.0" /> | ||
</group> | ||
</dependencies> | ||
|
||
</metadata> | ||
<files> | ||
|
||
<!-- SkiaSharp.Views.UWP.dll --> | ||
<file platform="macos,windows" src="lib/monoandroid1.0/SkiaSharp.Views.UWP.dll" /> | ||
<file platform="macos,windows" src="lib/monoandroid1.0/SkiaSharp.Views.UWP.xml" /> | ||
<file platform="macos" src="lib/xamarinios1.0/SkiaSharp.Views.UWP.dll" /> | ||
<file platform="macos" src="lib/xamarinios1.0/SkiaSharp.Views.UWP.xml" /> | ||
<file platform="macos" src="lib/xamarinmac2.0/SkiaSharp.Views.UWP.dll" /> | ||
<file platform="macos" src="lib/xamarinmac2.0/SkiaSharp.Views.UWP.xml" /> | ||
|
||
<!-- the build bits --> | ||
<file src="_._" target="lib/uap10.0/_._" /> | ||
|
||
<!-- legal --> | ||
<file src="LICENSE.txt" /> | ||
|
||
</files> | ||
</package> |
Binary file added
BIN
+52.5 KB
samples/Basic/Uno/SkiaSharpSample.Android/Assets/Fonts/winjs-symbols.ttf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using Android.App; | ||
using Android.Runtime; | ||
using Com.Nostra13.Universalimageloader.Core; | ||
using Windows.UI.Xaml.Media; | ||
|
||
namespace SkiaSharpSample.Droid | ||
{ | ||
[Application] | ||
public class Application : Windows.UI.Xaml.NativeApplication | ||
{ | ||
public Application(IntPtr javaReference, JniHandleOwnership transfer) | ||
: base(() => new App(), javaReference, transfer) | ||
{ | ||
ConfigureUniversalImageLoader(); | ||
} | ||
|
||
private void ConfigureUniversalImageLoader() | ||
{ | ||
// Create global configuration and initialize ImageLoader with this config | ||
var config = new ImageLoaderConfiguration | ||
.Builder(Context) | ||
.Build(); | ||
|
||
ImageLoader.Instance.Init(config); | ||
|
||
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Android.App; | ||
using Android.Views; | ||
|
||
namespace SkiaSharpSample.Droid | ||
{ | ||
[Activity( | ||
MainLauncher = true, | ||
ConfigurationChanges = Uno.UI.ActivityHelper.AllConfigChanges, | ||
WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden)] | ||
public class MainActivity : Windows.UI.Xaml.ApplicationActivity | ||
{ | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
samples/Basic/Uno/SkiaSharpSample.Android/Properties/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" package="com.companyname.skiasharpsample" android:versionCode="1"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" /> | ||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:label="@string/app_name" android:theme="@style/Theme.AppCompat" android:hardwareAccelerated="true"></application> | ||
</manifest> |
30 changes: 30 additions & 0 deletions
30
samples/Basic/Uno/SkiaSharpSample.Android/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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("SkiaSharpSample.Android")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SkiaSharpSample.Android")] | ||
[assembly: AssemblyCopyright("Copyright © 2020")] | ||
[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")] |
91 changes: 91 additions & 0 deletions
91
samples/Basic/Uno/SkiaSharpSample.Android/Resources/drawable/ic_launcher_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright 2020 Google LLC | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ https://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
~ | ||
--> | ||
|
||
<vector | ||
android:height="108dp" | ||
android:width="108dp" | ||
android:viewportHeight="108" | ||
android:viewportWidth="108" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#3DDC84" | ||
android:pathData="M0,0h108v108h-108z"/> | ||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89" | ||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
</vector> |
5 changes: 5 additions & 0 deletions
5
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-anydpi-v26/ic_launcher.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ic_launcher_background"/> | ||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
</adaptive-icon> |
5 changes: 5 additions & 0 deletions
5
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-anydpi-v26/ic_launcher_round.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ic_launcher_background"/> | ||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
</adaptive-icon> |
Binary file added
BIN
+4.68 KB
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.6 KB
...ic/Uno/SkiaSharpSample.Android/Resources/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.02 KB
...s/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.71 KB
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.23 KB
...ic/Uno/SkiaSharpSample.Android/Resources/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.99 KB
...s/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.89 KB
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.8 KB
...c/Uno/SkiaSharpSample.Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.5 KB
.../Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.8 KB
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.1 KB
.../Uno/SkiaSharpSample.Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.6 KB
...Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.4 KB
samples/Basic/Uno/SkiaSharpSample.Android/Resources/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+43.4 KB
...Uno/SkiaSharpSample.Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.9 KB
...asic/Uno/SkiaSharpSample.Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
samples/Basic/Uno/SkiaSharpSample.Android/Resources/values/Strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">SkiaSharp</string> | ||
</resources> |
21 changes: 21 additions & 0 deletions
21
samples/Basic/Uno/SkiaSharpSample.Android/Resources/values/ic_launcher_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Copyright 2020 Google LLC | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ https://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
~ | ||
--> | ||
|
||
<resources> | ||
<color name="ic_launcher_background">#F8F8F8</color> | ||
</resources> |
Oops, something went wrong.