From bc5a9ab20d6350b258da55a01ffe81c33fe36b4b Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 14:08:59 +0200 Subject: [PATCH 1/8] udated to rc2.1 --- readme.md | 4 ++-- templates/csharp/app-mvvm/.template.config/template.json | 4 ++-- templates/csharp/app/.template.config/template.json | 4 ++-- templates/csharp/xplat/Directory.Build.props | 2 +- templates/fsharp/app-mvvm/.template.config/template.json | 4 ++-- templates/fsharp/app/.template.config/template.json | 4 ++-- templates/fsharp/xplat/Directory.Build.props | 2 +- tests/build-test.ps1 | 8 ++++---- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/readme.md b/readme.md index 154cd716..7cf24fd4 100644 --- a/readme.md +++ b/readme.md @@ -58,7 +58,7 @@ Available parameters: *Description*: The target version of Avalonia NuGet packages. -*Options*: **0.10.21**, **11.0.0-rc1.1** +*Options*: **0.10.21**, **11.0.0-rc2.1** *By default*: 0.10.21 @@ -99,7 +99,7 @@ Available parameters: *Description*: The target version of Avalonia NuGet packages. -*Options*: **0.10.21**, **11.0.0-rc1.1** +*Options*: **0.10.21**, **11.0.0-rc2.1** *By default*: 0.10.21 diff --git a/templates/csharp/app-mvvm/.template.config/template.json b/templates/csharp/app-mvvm/.template.config/template.json index dbaf3268..6a2cc670 100644 --- a/templates/csharp/app-mvvm/.template.config/template.json +++ b/templates/csharp/app-mvvm/.template.config/template.json @@ -72,8 +72,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc1.1", - "description": "Target 11.0.0-rc1.1" + "choice": "11.0.0-rc2.1", + "description": "Target 11.0.0-rc2.1" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/csharp/app/.template.config/template.json b/templates/csharp/app/.template.config/template.json index ddb9f6e8..e7224b55 100644 --- a/templates/csharp/app/.template.config/template.json +++ b/templates/csharp/app/.template.config/template.json @@ -48,8 +48,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc1.1", - "description": "Target 11.0.0-rc1.1" + "choice": "11.0.0-rc2.1", + "description": "Target 11.0.0-rc2.1" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/csharp/xplat/Directory.Build.props b/templates/csharp/xplat/Directory.Build.props index 5a014d1f..35716777 100644 --- a/templates/csharp/xplat/Directory.Build.props +++ b/templates/csharp/xplat/Directory.Build.props @@ -1,6 +1,6 @@ enable - 11.0.0-rc1.1 + 11.0.0-rc2.1 diff --git a/templates/fsharp/app-mvvm/.template.config/template.json b/templates/fsharp/app-mvvm/.template.config/template.json index fb9f5d23..5dfd0d8e 100644 --- a/templates/fsharp/app-mvvm/.template.config/template.json +++ b/templates/fsharp/app-mvvm/.template.config/template.json @@ -72,8 +72,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc1.1", - "description": "Target 11.0.0-rc1.1" + "choice": "11.0.0-rc2.1", + "description": "Target 11.0.0-rc2.1" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/fsharp/app/.template.config/template.json b/templates/fsharp/app/.template.config/template.json index d39530ee..bbd7149a 100644 --- a/templates/fsharp/app/.template.config/template.json +++ b/templates/fsharp/app/.template.config/template.json @@ -48,8 +48,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc1.1", - "description": "Target 11.0.0-rc1.1" + "choice": "11.0.0-rc2.1", + "description": "Target 11.0.0-rc2.1" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/fsharp/xplat/Directory.Build.props b/templates/fsharp/xplat/Directory.Build.props index a836828d..6cb95f15 100644 --- a/templates/fsharp/xplat/Directory.Build.props +++ b/templates/fsharp/xplat/Directory.Build.props @@ -1,5 +1,5 @@ - 11.0.0-rc1.1 + 11.0.0-rc2.1 diff --git a/tests/build-test.ps1 b/tests/build-test.ps1 index f6ed70a3..02e57bd8 100644 --- a/tests/build-test.ps1 +++ b/tests/build-test.ps1 @@ -97,7 +97,7 @@ $binlog = [IO.Path]::GetFullPath([IO.Path]::Combine($pwd, "..", "binlog", "test. Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "f" "net6.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "f" "net7.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "11.0.0-rc1.1" $binlog +Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "11.0.0-rc2.1" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "true" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "false" $binlog @@ -105,7 +105,7 @@ Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "false" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "C#" "f" "net6.0" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "C#" "f" "net7.0" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "11.0.0-rc1.1" $binlog +Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "11.0.0-rc2.1" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "m" "ReactiveUI" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "m" "CommunityToolkit" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "cb" "true" $binlog @@ -122,14 +122,14 @@ Create-And-Build "avalonia.xplat" "AvaloniaXplat" "C#" "rvl" "false" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "f" "net6.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "f" "net7.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "11.0.0-rc1.1" $binlog +Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "11.0.0-rc2.1" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "cb" "true" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "cb" "false" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "F#" "f" "net6.0" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "F#" "f" "net7.0" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "11.0.0-rc1.1" $binlog +Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "11.0.0-rc2.1" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "m" "ReactiveUI" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "m" "CommunityToolkit" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "cb" "true" $binlog From 911a88022e6cc0bb05a8f736954085716676320c Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 18:11:52 +0200 Subject: [PATCH 2/8] fix android activities --- .../AvaloniaTest.Android/MainActivity.cs | 17 ++++++++-- .../AvaloniaTest.Android/SplashActivity.cs | 32 ------------------- .../xplat/AvaloniaTest.Android/Activities.fs | 22 +++---------- 3 files changed, 20 insertions(+), 51 deletions(-) delete mode 100644 templates/csharp/xplat/AvaloniaTest.Android/SplashActivity.cs diff --git a/templates/csharp/xplat/AvaloniaTest.Android/MainActivity.cs b/templates/csharp/xplat/AvaloniaTest.Android/MainActivity.cs index 94ea910d..9ac57834 100644 --- a/templates/csharp/xplat/AvaloniaTest.Android/MainActivity.cs +++ b/templates/csharp/xplat/AvaloniaTest.Android/MainActivity.cs @@ -1,10 +1,23 @@ using Android.App; using Android.Content.PM; +using Avalonia; using Avalonia.Android; +using Avalonia.ReactiveUI; namespace AvaloniaTest.Android; -[Activity(Label = "AvaloniaTest.Android", Theme = "@style/MyTheme.NoActionBar", Icon = "@drawable/icon", LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] -public class MainActivity : AvaloniaMainActivity +[Activity( + Label = "AvaloniaTest.Android", + Theme = "@style/MyTheme.NoActionBar", + Icon = "@drawable/icon", + MainLauncher = true, + ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] +public class MainActivity : AvaloniaMainActivity { + protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) + { + return base.CustomizeAppBuilder(builder) + .WithInterFont() + .UseReactiveUI(); + } } diff --git a/templates/csharp/xplat/AvaloniaTest.Android/SplashActivity.cs b/templates/csharp/xplat/AvaloniaTest.Android/SplashActivity.cs deleted file mode 100644 index 020aee30..00000000 --- a/templates/csharp/xplat/AvaloniaTest.Android/SplashActivity.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Android.App; -using Android.Content; -using Android.OS; -using Application = Android.App.Application; -using Avalonia; -using Avalonia.Android; -using Avalonia.ReactiveUI; - -namespace AvaloniaTest.Android; - -[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)] -public class SplashActivity : AvaloniaSplashActivity -{ - protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) - { - return base.CustomizeAppBuilder(builder) - .WithInterFont() - .UseReactiveUI(); - } - - protected override void OnCreate(Bundle? savedInstanceState) - { - base.OnCreate(savedInstanceState); - } - - protected override void OnResume() - { - base.OnResume(); - - StartActivity(new Intent(Application.Context, typeof(MainActivity))); - } -} diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs b/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs index 0d8fb441..56cde74f 100644 --- a/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs @@ -1,34 +1,22 @@ namespace AvaloniaTest.Android + open Android.App -open Android.Content open Android.Content.PM open Avalonia open Avalonia.ReactiveUI -open Android.OS -type Application = Android.App.Application - open Avalonia.Android -open AvaloniaTest +open AvaloniaApplication1 [] + MainLauncher = true, + ConfigurationChanges = (ConfigChanges.Orientation ||| ConfigChanges.ScreenSize ||| ConfigChanges.UiMode))>] type MainActivity() = - inherit AvaloniaMainActivity() - - -[] -type SplashActivity() = - inherit AvaloniaSplashActivity() + inherit AvaloniaMainActivity() override _.CustomizeAppBuilder(builder) = base.CustomizeAppBuilder(builder) .WithInterFont() .UseReactiveUI() - - override x.OnResume() = - base.OnResume() - x.StartActivity(new Intent(Application.Context, typeof)) From 9a0d3c002bd1a5f97d312d2603700436a38a5895 Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 18:30:42 +0200 Subject: [PATCH 3/8] fixed namespace --- templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs b/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs index 56cde74f..b194fca1 100644 --- a/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Activities.fs @@ -5,7 +5,7 @@ open Android.Content.PM open Avalonia open Avalonia.ReactiveUI open Avalonia.Android -open AvaloniaApplication1 +open AvaloniaTest [ Date: Sat, 1 Jul 2023 18:31:17 +0200 Subject: [PATCH 4/8] added android colors ressources missing for F# --- .../AvaloniaTest.Android/Resources/values-night/colors.xml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-night/colors.xml diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-night/colors.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-night/colors.xml new file mode 100644 index 00000000..3d47b6fc --- /dev/null +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #212121 + From d4df879de277e5dbf3a21c3a949c7d826df7596f Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 19:55:29 +0200 Subject: [PATCH 5/8] added Xamarin.AndroidX.Core.SplashScreen to android projects --- .../xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj | 1 + .../xplat/AvaloniaTest.Android/AvaloniaTest.Android.fsproj | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/csharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj b/templates/csharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj index f66c40d8..39a12248 100644 --- a/templates/csharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj +++ b/templates/csharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj @@ -19,6 +19,7 @@ + diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.fsproj b/templates/fsharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.fsproj index cd7edd2f..a7ba2d2f 100644 --- a/templates/fsharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.fsproj +++ b/templates/fsharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.fsproj @@ -22,6 +22,7 @@ + From d209c9d8efffca4a58b43ded7a1ded7da177ae65 Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 20:06:21 +0200 Subject: [PATCH 6/8] removed splash theme --- .../xplat/AvaloniaTest.Android/Resources/values/styles.xml | 5 ----- .../xplat/AvaloniaTest.Android/Resources/values/styles.xml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml index 2759d290..6da1712a 100644 --- a/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml @@ -9,9 +9,4 @@ true - - diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml index 2759d290..6da1712a 100644 --- a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml @@ -9,9 +9,4 @@ true - - From 5f7aada9ca950f386a97530bbc7aa7bd1f2cb042 Mon Sep 17 00:00:00 2001 From: mrxx99 Date: Sat, 1 Jul 2023 23:02:15 +0200 Subject: [PATCH 7/8] updated android resources from ControlCatalog --- .../Resources/AboutResources.txt | 44 ++++++++++++ .../drawable-night-v31/avalonia_anim.xml | 66 +++++++++++++++++ .../Resources/drawable-v31/avalonia_anim.xml | 71 +++++++++++++++++++ .../Resources/values-v31/styles.xml | 21 ++++++ .../Resources/values/styles.xml | 4 +- .../Resources/AboutResources.txt | 44 ++++++++++++ .../drawable-night-v31/avalonia_anim.xml | 66 +++++++++++++++++ .../Resources/drawable-v31/avalonia_anim.xml | 71 +++++++++++++++++++ .../Resources/values-v31/styles.xml | 21 ++++++ .../Resources/values/styles.xml | 4 +- 10 files changed, 408 insertions(+), 4 deletions(-) create mode 100644 templates/csharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt create mode 100644 templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml create mode 100644 templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml create mode 100644 templates/csharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml create mode 100644 templates/fsharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt create mode 100644 templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml create mode 100644 templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml create mode 100644 templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt b/templates/csharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt new file mode 100644 index 00000000..c2bca974 --- /dev/null +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt @@ -0,0 +1,44 @@ +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.axml), +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/ + icon.png + + layout/ + main.axml + + 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 "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + 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 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. \ No newline at end of file diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml b/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml new file mode 100644 index 00000000..dde4b5a7 --- /dev/null +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml b/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml new file mode 100644 index 00000000..94f27d9e --- /dev/null +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml new file mode 100644 index 00000000..d5ecec43 --- /dev/null +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml index 6da1712a..6e534de2 100644 --- a/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml +++ b/templates/csharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml @@ -4,9 +4,9 @@ - - diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt new file mode 100644 index 00000000..c2bca974 --- /dev/null +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/AboutResources.txt @@ -0,0 +1,44 @@ +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.axml), +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/ + icon.png + + layout/ + main.axml + + 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 "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + 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 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. \ No newline at end of file diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml new file mode 100644 index 00000000..dde4b5a7 --- /dev/null +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-night-v31/avalonia_anim.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml new file mode 100644 index 00000000..94f27d9e --- /dev/null +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/drawable-v31/avalonia_anim.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml new file mode 100644 index 00000000..d5ecec43 --- /dev/null +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values-v31/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml index 6da1712a..6e534de2 100644 --- a/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml +++ b/templates/fsharp/xplat/AvaloniaTest.Android/Resources/values/styles.xml @@ -4,9 +4,9 @@ - - From 3bf1e623e2273a246186940207ef5b6a76561098 Mon Sep 17 00:00:00 2001 From: Mrxx99 <33566379+Mrxx99@users.noreply.github.com> Date: Sun, 2 Jul 2023 11:16:52 +0000 Subject: [PATCH 8/8] updated to rc2.2 --- readme.md | 4 ++-- templates/csharp/app-mvvm/.template.config/template.json | 4 ++-- templates/csharp/app/.template.config/template.json | 4 ++-- templates/csharp/xplat/Directory.Build.props | 2 +- templates/fsharp/app-mvvm/.template.config/template.json | 4 ++-- templates/fsharp/app/.template.config/template.json | 4 ++-- templates/fsharp/xplat/Directory.Build.props | 2 +- tests/build-test.ps1 | 8 ++++---- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/readme.md b/readme.md index 7cf24fd4..54f11c29 100644 --- a/readme.md +++ b/readme.md @@ -58,7 +58,7 @@ Available parameters: *Description*: The target version of Avalonia NuGet packages. -*Options*: **0.10.21**, **11.0.0-rc2.1** +*Options*: **0.10.21**, **11.0.0-rc2.2** *By default*: 0.10.21 @@ -99,7 +99,7 @@ Available parameters: *Description*: The target version of Avalonia NuGet packages. -*Options*: **0.10.21**, **11.0.0-rc2.1** +*Options*: **0.10.21**, **11.0.0-rc2.2** *By default*: 0.10.21 diff --git a/templates/csharp/app-mvvm/.template.config/template.json b/templates/csharp/app-mvvm/.template.config/template.json index 6a2cc670..7b9336f0 100644 --- a/templates/csharp/app-mvvm/.template.config/template.json +++ b/templates/csharp/app-mvvm/.template.config/template.json @@ -72,8 +72,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc2.1", - "description": "Target 11.0.0-rc2.1" + "choice": "11.0.0-rc2.2", + "description": "Target 11.0.0-rc2.2" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/csharp/app/.template.config/template.json b/templates/csharp/app/.template.config/template.json index e7224b55..f62ca592 100644 --- a/templates/csharp/app/.template.config/template.json +++ b/templates/csharp/app/.template.config/template.json @@ -48,8 +48,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc2.1", - "description": "Target 11.0.0-rc2.1" + "choice": "11.0.0-rc2.2", + "description": "Target 11.0.0-rc2.2" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/csharp/xplat/Directory.Build.props b/templates/csharp/xplat/Directory.Build.props index 35716777..d55cf210 100644 --- a/templates/csharp/xplat/Directory.Build.props +++ b/templates/csharp/xplat/Directory.Build.props @@ -1,6 +1,6 @@ enable - 11.0.0-rc2.1 + 11.0.0-rc2.2 diff --git a/templates/fsharp/app-mvvm/.template.config/template.json b/templates/fsharp/app-mvvm/.template.config/template.json index 5dfd0d8e..09ad24c7 100644 --- a/templates/fsharp/app-mvvm/.template.config/template.json +++ b/templates/fsharp/app-mvvm/.template.config/template.json @@ -72,8 +72,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc2.1", - "description": "Target 11.0.0-rc2.1" + "choice": "11.0.0-rc2.2", + "description": "Target 11.0.0-rc2.2" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/fsharp/app/.template.config/template.json b/templates/fsharp/app/.template.config/template.json index bbd7149a..6d122ea1 100644 --- a/templates/fsharp/app/.template.config/template.json +++ b/templates/fsharp/app/.template.config/template.json @@ -48,8 +48,8 @@ "description": "Target 0.10.21 (Latest stable)." }, { - "choice": "11.0.0-rc2.1", - "description": "Target 11.0.0-rc2.1" + "choice": "11.0.0-rc2.2", + "description": "Target 11.0.0-rc2.2" } ], "replaces": "AvaloniaVersionTemplateParameter", diff --git a/templates/fsharp/xplat/Directory.Build.props b/templates/fsharp/xplat/Directory.Build.props index 6cb95f15..e601141c 100644 --- a/templates/fsharp/xplat/Directory.Build.props +++ b/templates/fsharp/xplat/Directory.Build.props @@ -1,5 +1,5 @@ - 11.0.0-rc2.1 + 11.0.0-rc2.2 diff --git a/tests/build-test.ps1 b/tests/build-test.ps1 index 02e57bd8..623afe01 100644 --- a/tests/build-test.ps1 +++ b/tests/build-test.ps1 @@ -97,7 +97,7 @@ $binlog = [IO.Path]::GetFullPath([IO.Path]::Combine($pwd, "..", "binlog", "test. Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "f" "net6.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "f" "net7.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "11.0.0-rc2.1" $binlog +Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "av" "11.0.0-rc2.2" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "true" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "false" $binlog @@ -105,7 +105,7 @@ Create-And-Build "avalonia.app" "AvaloniaApp" "C#" "cb" "false" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "C#" "f" "net6.0" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "C#" "f" "net7.0" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "11.0.0-rc2.1" $binlog +Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "av" "11.0.0-rc2.2" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "m" "ReactiveUI" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "m" "CommunityToolkit" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "C#" "cb" "true" $binlog @@ -122,14 +122,14 @@ Create-And-Build "avalonia.xplat" "AvaloniaXplat" "C#" "rvl" "false" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "f" "net6.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "f" "net7.0" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "11.0.0-rc2.1" $binlog +Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "av" "11.0.0-rc2.2" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "cb" "true" $binlog Create-And-Build "avalonia.app" "AvaloniaApp" "F#" "cb" "false" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "F#" "f" "net6.0" $binlog Test-Template "avalonia.mvvm" "AvaloniaMvvm" "F#" "f" "net7.0" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "0.10.21" $binlog -Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "11.0.0-rc2.1" $binlog +Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "av" "11.0.0-rc2.2" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "m" "ReactiveUI" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "m" "CommunityToolkit" $binlog Create-And-Build "avalonia.mvvm" "AvaloniaMvvm" "F#" "cb" "true" $binlog