diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/drawable/Icon.png b/demo/Semi.Avalonia.Demo.Android/Icon.png similarity index 100% rename from demo/Semi.Avalonia.Demo.Android/Resources/drawable/Icon.png rename to demo/Semi.Avalonia.Demo.Android/Icon.png diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/AboutResources.txt b/demo/Semi.Avalonia.Demo.Android/Resources/AboutResources.txt new file mode 100644 index 0000000..c2bca97 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.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/demo/Semi.Avalonia.Demo.Android/Resources/drawable-night-v31/avalonia_anim.xml b/demo/Semi.Avalonia.Demo.Android/Resources/drawable-night-v31/avalonia_anim.xml new file mode 100644 index 0000000..dde4b5a --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Android/Resources/drawable-night-v31/avalonia_anim.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/drawable-v31/avalonia_anim.xml b/demo/Semi.Avalonia.Demo.Android/Resources/drawable-v31/avalonia_anim.xml new file mode 100644 index 0000000..94f27d9 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Android/Resources/drawable-v31/avalonia_anim.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/values-night/colors.xml b/demo/Semi.Avalonia.Demo.Android/Resources/values-night/colors.xml new file mode 100644 index 0000000..3d47b6f --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Android/Resources/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #212121 + diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/values-v31/styles.xml b/demo/Semi.Avalonia.Demo.Android/Resources/values-v31/styles.xml new file mode 100644 index 0000000..d5ecec4 --- /dev/null +++ b/demo/Semi.Avalonia.Demo.Android/Resources/values-v31/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml b/demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml index b184ab9..6e534de 100644 --- a/demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml +++ b/demo/Semi.Avalonia.Demo.Android/Resources/values/styles.xml @@ -1,17 +1,12 @@ - + - - - - diff --git a/demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj b/demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj index 2a1b2ad..1c08a69 100644 --- a/demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj +++ b/demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj @@ -3,23 +3,28 @@ Exe net8.0-android 21 + enable com.irihitech.Semi.Avalonia 1 1.0 apk - False + false true Semi.Avalonia.Demo.Android - - - + + Resources\drawable\Icon.png + - + + + + + + - \ No newline at end of file