Commit 062cf48d authored by Mattia's avatar Mattia

Add SampleApp

parents
File added
using System;
using Android.Views.Accessibility;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using SampleApp.Droid;
using SampleApp.DependencyServices;
[assembly: Dependency(typeof(AndroidAssignFocus))]
namespace SampleApp.Droid
{
public class AndroidAssignFocus : IAssignFocus
{
public AndroidAssignFocus()
{
}
public void AssignFocus(View v)
{
v.GetRenderer().View.SendAccessibilityEvent(EventTypes.ViewHoverEnter);
}
}
}
using System;
using Android.Content;
using Android.Service.Autofill;
using Android.Views.Accessibility;
using CustomViewAccessibility.Droid;
using SampleApp.CustomRenderers;
using SampleApp.Views;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(CustomImage), typeof(AndroidFocusEvents))]
namespace CustomViewAccessibility.Droid
{
public class AndroidFocusEvents : ImageRenderer
{
Context context;
public AndroidFocusEvents(Context context) : base(context)
{
this.context = context;
}
protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
{
base.OnElementChanged(e);
if (Control == null)
{
return;
}
}
protected override Android.Widget.ImageView CreateNativeControl()
{
return new AccessibleButton(context);
}
}
public class AccessibleButton : Android.Widget.ImageView
{
public AccessibleButton(Context context) : base(context)
{
Console.WriteLine("***** AccessibleButton created *****");
}
public override void OnInitializeAccessibilityEvent(AccessibilityEvent e)
{
base.OnInitializeAccessibilityEvent(e);
if (e.EventType == EventTypes.ViewAccessibilityFocused)
{
Functionality4.myLabel.Text = "Bell Image Has Focus";
Console.WriteLine("ACCESSIBILITY I am in focus");
}
else if (e.EventType == EventTypes.ViewAccessibilityFocusCleared)
{
Functionality4.myLabel.Text = "Bell Image does not have focus";
Console.WriteLine("ACCESSIBILITY I am in NOT in focus");
}
}
}
}
using System;
using Android.Views;
using fun5.Droid;
using SampleApp.DependencyServices;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: Dependency(typeof(focusAndroid))]
namespace fun5.Droid
{
public class focusAndroid : IIsFocused
{
public bool isFocused(Xamarin.Forms.View v)
{
return v.GetRenderer().View.IsAccessibilityFocused;
}
}
}
\ No newline at end of file
using System;
using SampleApp.DependencyServices;
using SampleApp.Droid;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: Dependency(typeof(AndroidHeaderPane))]
namespace SampleApp.Droid
{
public class AndroidHeaderPane : IAccessibilityHeading, IAccessibilityPane
{
public AndroidHeaderPane()
{
}
public void SetHeading(View v)
{
v.GetRenderer().View.AccessibilityHeading = true;
}
//check if the passed view (vc) is a header
public bool CheckHeading(View vc)
{
if (vc.GetRenderer().View.AccessibilityHeading == true)
{
return true;
}
return false;
}
public void SetPane(View v, string t)
{
v.GetRenderer().View.AccessibilityPaneTitle = t;
}
public bool CheckPane(View vc)
{
if (vc.GetRenderer().View.AccessibilityPaneTitle == null)
{
return false;
}
return true;
}
}
}
using System;
using SampleApp.DependencyServices;
using SampleApp.Droid;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: Dependency(typeof(AndroidReadText))]
namespace SampleApp.Droid
{
public class AndroidReadText : IReadText
{
public AndroidReadText()
{
}
public void ReadText(Label t)
{
t.GetRenderer().View.AnnounceForAccessibility(t.Text);
}
}
}
using System;
using Android.Views.Accessibility;
using SampleApp.DependencyServices;
using SampleApp.Droid;
using Xamarin.Forms;
using Android.Content;
using Android.Runtime;
using Android.Views;
[assembly: Dependency(typeof(AndroidScreenReaderEnabled))]
namespace SampleApp.Droid
{
public class AndroidScreenReaderEnabled : IScreenReaderEnabled
{
AccessibilityManager accessibilityManager =(AccessibilityManager)Android.App.Application.Context.GetSystemService(Context.AccessibilityService);
public bool IsScreenReaderEnabled()
{
return accessibilityManager.IsEnabled;
}
}
}
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
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");
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace SampleApp.Droid
{
[Activity(Label = "SampleApp", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
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);
}
}
}
\ No newline at end of file
<?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.progetto.xamarinaccessibilityname.sampleapp">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="SampleApp.Android"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
\ No newline at end of file
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("SampleApp.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SampleApp.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
[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)]
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?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" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<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" />
\ No newline at end of file
<?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>
\ No newline at end of file
<?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>
\ No newline at end of file
<?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>
\ No newline at end of file
<?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 https://aka.ms/material-colors -->
<!-- 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>
\ No newline at end of file
<?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>{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>SampleApp.Droid</RootNamespace>
<AssemblyName>SampleApp.Android</AssemblyName>
<Deterministic>True</Deterministic>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<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>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</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.8.0.1451" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="AndroidAssignFocus.cs" />
<Compile Include="AndroidFocusEvents.cs" />
<Compile Include="AndroidHasFocus.cs" />
<Compile Include="AndroidScreenReaderEnabled.cs" />
<Compile Include="AndroidReadText.cs" />
<Compile Include="AndroidHeaderPane.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.xml" />
<AndroidResource Include="Resources\layout\Toolbar.xml" />
<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\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SampleApp\SampleApp.csproj">
<Project>{36468AF5-C081-4DB5-8795-AF44724D5CE4}</Project>
<Name>SampleApp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
{
"protocol_version" : "0.0.6",
"configuration" : {
"version" : "(6.10.0.104) (2019-12/5d03a6fe116)",
"tlc" : "normal",
"sigsgev" : "altstack",
"notifications" : "kqueue",
"architecture" : "amd64",
"disabled_features" : "none",
"smallconfig" : "disabled",
"bigarrays" : "disabled",
"softdebug" : "enabled",
"interpreter" : "enabled",
"llvm_support" : "0",
"suspend" : "hybrid"
},
"memory" : {
"Resident Size" : "388927488",
"Virtual Size" : "4940533760",
"minor_gc_time" : "2771643",
"major_gc_time" : "1381106",
"minor_gc_count" : "13",
"major_gc_count" : "6",
"major_gc_time_concurrent" : "0"
},
"threads" : [
{
"is_managed" : false,
"offset_free_hash" : "0x0",
"offset_rich_hash" : "0x0",
"crashed" : false,
"native_thread_id" : "0x10fb96dc0",
"thread_info_addr" : "0x7fc60f011400",
"thread_name" : "tid_307",
"ctx" : {
"IP" : "0x7fff6987a882",
"SP" : "0x7ffee9bb1ca8",
"BP" : "0x7ffee9bb1d40"
},
"unmanaged_frames" : [
{
"is_managed" : "false",
"native_address" : "0x1060fe346",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106298aa5",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062987d7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106169ce0",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff6992f5fd",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7ffee9bb1998",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106345430",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10635d401",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062959e4",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062957ea",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1060c430a",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10604fe49",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff69736cc9",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x5",
"native_offset" : "0x00000"
}
]
},
{
"is_managed" : true,
"offset_free_hash" : "0x1cfb5decbf",
"offset_rich_hash" : "0x1cfb5df079",
"crashed" : true,
"native_thread_id" : "0x70000a86b000",
"thread_info_addr" : "0x7fc611763a00",
"thread_name" : "Thread Pool Worker",
"ctx" : {
"IP" : "0x7fff6987e33a",
"SP" : "0x70000a869648",
"BP" : "0x70000a869670"
},
"managed_frames" : [
{
"is_managed" : "false",
"native_address" : "unregistered"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x0000c"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001f8c",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x0001a"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001f32",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00028"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001f30",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00002"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000084",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x000ae"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000083",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00001"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x600006a",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00048"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x60000a1",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00001"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000067",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00001"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000075",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00057"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x0002a"
}
,
{
"is_managed" : "false",
"native_address" : "unregistered"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x0000c"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6004ced",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x0006a"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x60048d1",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000039",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00019"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000169",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00029"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000184",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00001"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ff3",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00007"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ece",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00071"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ecc",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ff1",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00021"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001fd9",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00074"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001fee",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x0002a"
}
],
"unmanaged_frames" : [
{
"is_managed" : "false",
"native_address" : "0x1060fe346",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106298aa5",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10629911a",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10616ada7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106102fb5",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10616a09f",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff6992f5fd",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "unregistered"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff69805808",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106368397",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10634927f",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10636871e",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10636889f",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106205059",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062055f2",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1063566d1",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106356a70",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106207706",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10622bab4",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001f8c",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000083",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x600006a",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x60000a1",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000067",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000075",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106060ae2",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10626e967",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106277409",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10620f38d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106223027",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x00000",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6004ced",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x60048d1",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000169",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "E5BBCD86-B476-47FC-970E-F00D99CDBAB3",
"token" : "0x6000184",
"native_offset" : "0x0",
"filename" : "MonoDevelop.MSBuildBuilder.exe",
"sizeofimage" : "0x18000",
"timestamp" : "0xc077b0d4",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ff3",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001ecc",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "true",
"guid" : "55ADAE45-46CD-485B-A70E-2948332EBE8C",
"token" : "0x6001fee",
"native_offset" : "0x0",
"filename" : "mscorlib.dll",
"sizeofimage" : "0x474000",
"timestamp" : "0xcdf122ed",
"il_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106060ae2",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106270342",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x10629c1c7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1061cff88",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062996ed",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff6993b109",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff69936b8b",
"native_offset" : "0x00000"
}
]
},
{
"is_managed" : false,
"offset_free_hash" : "0x0",
"offset_rich_hash" : "0x0",
"crashed" : false,
"native_thread_id" : "0x70000a15c000",
"thread_info_addr" : "0x7fc611008200",
"thread_name" : "Finalizer",
"ctx" : {
"IP" : "0x7fff69877e36",
"SP" : "0x70000a15beb8",
"BP" : "0x70000a15bf00"
},
"unmanaged_frames" : [
{
"is_managed" : "false",
"native_address" : "0x1060fe346",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106298aa5",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062987d7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x106169ce0",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff6992f5fd",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1000",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x1062996ed",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff6993b109",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
"native_address" : "0x7fff69936b8b",
"native_offset" : "0x00000"
}
]
}
]
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace SampleApp.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>SampleApp</string>
<key>CFBundleIdentifier</key>
<string>com.progetto.SampleApp</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>SampleApp</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace SampleApp.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("SampleApp.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SampleApp.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
// 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")]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238" />
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43" />
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="270" y="270" width="60" height="60" />
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0" />
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB" />
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39" />
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41" />
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="349" y="339" />
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="180" height="180" />
</resources>
</document>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0E082BA3-B87F-40B4-9700-878BE1A55954}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{6143fdea-f3c2-4a09-aafa-6e230626515e}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>SampleApp.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>SampleApp.iOS</AssemblyName>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<ProvisioningType>automatic</ProvisioningType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<CodesignKey>Apple Development: big.mattia@yahoo.it (SFLTA6UWYC)</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>Apple Development: big.mattia@yahoo.it (SFLTA6UWYC)</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>None</MtouchLink>
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="iOSAssignFocus.cs" />
<Compile Include="iOSFocusEvents.cs" />
<Compile Include="iOSHasFocus.cs" />
<Compile Include="iOSScreenReaderEnabled.cs" />
<Compile Include="iOSReadText.cs" />
<Compile Include="iOSMagicTap.cs" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1451" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\SampleApp\SampleApp.csproj">
<Project>{36468AF5-C081-4DB5-8795-AF44724D5CE4}</Project>
<Name>SampleApp</Name>
</ProjectReference>
</ItemGroup>
</Project>
\ No newline at end of file
using System;
using SampleApp.DependencyServices;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using SampleApp.iOS;
[assembly: Dependency(typeof(iOSAssignFocus))]
namespace SampleApp.iOS
{
public class iOSAssignFocus : IAssignFocus
{
public void AssignFocus(View v)
{
UIAccessibility.PostNotification(notification: UIAccessibilityPostNotification.ScreenChanged, argument: v.GetRenderer().NativeView);
}
}
}
using System;
using SampleApp.CustomRenderers;
using Xamarin.Forms;
using SampleApp.iOS;
using Xamarin.Forms.Platform.iOS;
using SampleApp.Views;
[assembly: ExportRenderer(typeof(CustomImage), typeof(iOSFocusEvents))]
namespace SampleApp.iOS
{
public class iOSFocusEvents : ImageRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
{
base.OnElementChanged(e);
if (Control != null)
{
SetNativeControl(new CustomButton());
}
}
}
public class CustomButton : FormsUIImageView
{
public CustomButton() : base()
{
Console.WriteLine("Custom button created");
}
public override void AccessibilityElementDidBecomeFocused()
{
base.AccessibilityElementDidBecomeFocused();
Functionality4.myLabel.Text = "Bell Image Has Focus";
}
public override void AccessibilityElementDidLoseFocus()
{
base.AccessibilityElementDidLoseFocus();
Functionality4.myLabel.Text = "Bell Image does not have focus";
}
}
}
using System;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using fun5.iOS;
using System.Threading.Tasks;
using SampleApp.DependencyServices;
[assembly: Dependency(typeof(iOSFocus))]
namespace fun5.iOS
{
public class iOSFocus : IIsFocused
{
public bool isFocused(View v)
{
return v.GetRenderer().NativeView.AccessibilityElementIsFocused();
}
}
}
using System;
using SampleApp.CustomRenderers;
using Xamarin.Forms;
using SampleApp.iOS;
using Xamarin.Forms.Platform.iOS;
using SampleApp.Views;
using UIKit;
[assembly: ExportRenderer(typeof(CustomView), typeof(iOSMagicTap))]
namespace SampleApp.iOS
{
public class iOSMagicTap : EditorRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)
{
base.OnElementChanged(e);
if (Control != null)
{
SetNativeControl(new MyView());
}
}
}
public class MyView : UITextView
{
private Random rnd = new Random();
public MyView() : base()
{
base.Text = "Perform a magic tap (tap with two fingers) to change the background color.";
base.AccessibilityPerformMagicTap();
base.Editable = false;
base.Font = base.Font.WithSize(30);
Functionality23.customEditor.BackgroundColor = Color.White;
Functionality23.customEditor.TextColor = Color.Black;
}
public override bool AccessibilityPerformMagicTap()
{
//random color
Color randomColor = Color.FromRgb(rnd.Next(256), rnd.Next(256), rnd.Next(256));
Functionality23.customEditor.Text = "MAGIC TAP";
Functionality23.customEditor.BackgroundColor = randomColor;
Functionality23.customEditor.TextColor = Color.White;
return true;
}
}
}
\ No newline at end of file
using System;
using System.Threading.Tasks;
using SampleApp.DependencyServices;
using SampleApp.iOS;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: Dependency(typeof(iOSReadText))]
namespace SampleApp.iOS
{
public class iOSReadText : IReadText
{
public iOSReadText()
{
}
public void ReadText(Label t)
{
Device.StartTimer(TimeSpan.FromMilliseconds(100.0), () =>
{
Foundation.NSString ss = new Foundation.NSString(t.Text);
UIAccessibility.PostNotification(UIAccessibilityPostNotification.Announcement, ss);
return false; // runs again, or false to stop
});
}
}
}
using System;
using SampleApp.DependencyServices;
using SampleApp.iOS;
using UIKit;
using Xamarin.Forms;
[assembly: Dependency(typeof(iOSScreenReaderEnabled))]
namespace SampleApp.iOS
{
public class iOSScreenReaderEnabled : IScreenReaderEnabled
{
public bool IsScreenReaderEnabled()
{
return UIAccessibility.IsVoiceOverRunning;
}
}
}
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Android", "SampleApp.Android\SampleApp.Android.csproj", "{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.iOS", "SampleApp.iOS\SampleApp.iOS.csproj", "{0E082BA3-B87F-40B4-9700-878BE1A55954}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "SampleApp\SampleApp.csproj", "{36468AF5-C081-4DB5-8795-AF44724D5CE4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|Any CPU.Build.0 = Release|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Debug|iPhone.Build.0 = Debug|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|iPhone.ActiveCfg = Release|Any CPU
{1EE7473C-9A98-44EF-8124-C4D1E0E468F8}.Release|iPhone.Build.0 = Release|Any CPU
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|iPhone.ActiveCfg = Debug|iPhone
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Debug|iPhone.Build.0 = Debug|iPhone
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|iPhone.ActiveCfg = Release|iPhone
{0E082BA3-B87F-40B4-9700-878BE1A55954}.Release|iPhone.Build.0 = Release|iPhone
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|Any CPU.Build.0 = Release|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Debug|iPhone.Build.0 = Debug|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|iPhone.ActiveCfg = Release|Any CPU
{36468AF5-C081-4DB5-8795-AF44724D5CE4}.Release|iPhone.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="SampleApp.App">
<Application.Resources>
</Application.Resources>
</Application>
\ No newline at end of file
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace SampleApp
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new NavigationPage(new MainPage());
}
protected override void OnStart()
{
}
protected override void OnSleep()
{
}
protected override void OnResume()
{
}
}
}
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
\ No newline at end of file
using System;
using Xamarin.Forms;
namespace SampleApp.CustomRenderers
{
public class CustomImage : Image
{
public CustomImage()
{
}
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.CustomRenderers
{
public class CustomLabel: Label
{
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.CustomRenderers
{
public class CustomView : Editor
{
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.DependencyServices
{
public interface IAccessibilityHeading
{
void SetHeading(View v);
bool CheckHeading(View vc);
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.DependencyServices
{
public interface IAccessibilityPane
{
void SetPane(View v, string t);
bool CheckPane(View vc);
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.DependencyServices
{
public interface IAssignFocus
{
void AssignFocus(View v);
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.DependencyServices
{
public interface IIsFocused
{
bool isFocused(View v);
}
}
using System;
using Xamarin.Forms;
namespace SampleApp.DependencyServices
{
public interface IReadText
{
void ReadText(Label t);
}
}
using System;
namespace SampleApp.DependencyServices
{
public interface IScreenReaderEnabled
{
bool IsScreenReaderEnabled();
}
}
using System;
using System.Reflection;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace SampleApp
{
[ContentProperty(nameof(Source))]
public class ImageResourceExtension : IMarkupExtension
{
public string Source { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Source == null)
{
return null;
}
// Do your translation lookup here, using whatever method you require
var imageSource = ImageSource.FromResource(Source, typeof(ImageResourceExtension).GetTypeInfo().Assembly);
return imageSource;
}
}
}
using System;
using System.Collections.ObjectModel;
namespace SampleApp
{
public class APIFunctionality
{
public string Name { get; set; }
public string Description { get; set; }
public string Availability { get; set; }
public override string ToString()
{
return Name;
}
}
public class GroupedAPIFunctionality : ObservableCollection<APIFunctionality>
{
public string LongName { get; set; }
public string ShortName { get; set; }
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1451" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
<Folder Include="ViewModels\" />
<Folder Include="Views\" />
<Folder Include="images\" />
<Folder Include="DependencyServices\" />
<Folder Include="CustomRenderers\" />
</ItemGroup>
<ItemGroup>
<None Remove="images\fork.png" />
<None Remove="images\bell.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="images\fork.png" />
<EmbeddedResource Include="images\bell.png" />
</ItemGroup>
</Project>
\ No newline at end of file
using System;
using System.Collections.ObjectModel;
using Xamarin.Forms;
namespace SampleApp.ViewModels
{
public class ListPageViewModel
{
public ObservableCollection<GroupedAPIFunctionality> APIList { get; set; }
public ListPageViewModel()
{
var listView = new ListView();
APIList = new ObservableCollection<GroupedAPIFunctionality>();
var accessibilityFocus = new GroupedAPIFunctionality() { LongName = "Accessibility Focus", ShortName = "AF" };
var TextToAnnounce = new GroupedAPIFunctionality() { LongName = "Text To Announce", ShortName = "TTA" };
var explicitTTS = new GroupedAPIFunctionality() { LongName = "Explicit TTS", ShortName = "TTS" };
var accessibilityTree = new GroupedAPIFunctionality() { LongName = "Accessibility Tree", ShortName = "AT" };
var miscellanous = new GroupedAPIFunctionality() { LongName = "Miscellanous", ShortName = "M" };
accessibilityFocus.Add(new APIFunctionality
{
Name = "1",
Description = "Specify which views should receive the accessibility focus"
});
accessibilityFocus.Add(new APIFunctionality
{
Name = "2",
Description = "Specify the accessibility focus order",
});
accessibilityFocus.Add(new APIFunctionality
{
Name = "3",
Description = "Assign the accessibility focus to a view",
Availability = "Indirect implementation",
});
accessibilityFocus.Add(new APIFunctionality
{
Name = "4",
Description = "Specify actions associated to accessibility focus-related events (e.g., a view acquires or loses the focus)",
Availability = "Indirect implementation",
});
accessibilityFocus.Add(new APIFunctionality
{
Name = "5",
Description = "Determine whether a view has the accessibility focus or which view has the accessibility focus",
Availability = "Indirect implementation",
});
TextToAnnounce.Add(new APIFunctionality
{
Name = "6",
Description = "Specify attributes that contribute to form the text-to-announce",
});
TextToAnnounce.Add(new APIFunctionality
{
Name = "7",
Description = "Programmatically define the text-to-announce",
Availability = "Not available on XAMARIN",
});
TextToAnnounce.Add(new APIFunctionality
{
Name = "8",
Description = "Use one view to describe another one",
Availability = "Semi-direct implementation on iOS",
});
TextToAnnounce.Add(new APIFunctionality
{
Name = "9",
Description = "Specify that a view should be announced when changed, even without user interaction",
Availability = "Not available on XAMARIN",
});
TextToAnnounce.Add(new APIFunctionality
{
Name = "10",
Description = "Specify in which language the text-to-announce should be read",
Availability = "Not available on XAMARIN",
});
explicitTTS.Add(new APIFunctionality
{
Name = "11",
Description = "Read a text with the screen-reader TTS",
Availability = "Indirect Implementation",
});
explicitTTS.Add(new APIFunctionality
{
Name = "12",
Description = "Be informed when the screen-reader finishes reading an explicitly provided text",
Availability = "Not available on XAMARIN",
});
explicitTTS.Add(new APIFunctionality
{
Name = "13",
Description = "Customize screen-reader TTS speech features, like pitch, speed, etc...",
Availability = "Not available on XAMARIN",
});
explicitTTS.Add(new APIFunctionality
{
Name = "14",
Description = "Read a text with non-screen-reader TTS (also works when screen-reader is not active)",
});
explicitTTS.Add(new APIFunctionality
{
Name = "15",
Description = "Detect whether the non-screen-reader TTS is reading",
Availability = "Not available on XAMARIN",
});
explicitTTS.Add(new APIFunctionality
{
Name = "16",
Description = "Pause the non-screen-reader TTS",
Availability = "Not available on XAMARIN",
});
explicitTTS.Add(new APIFunctionality
{
Name = "17",
Description = "Customize non-screen-reader TTS speech features, like pitch, speed, etc...",
});
accessibilityTree.Add(new APIFunctionality
{
Name = "18",
Description = "Aggregate multiple views into a single accessible element",
Availability = "Semi-direct implementation on iOS",
});
accessibilityTree.Add(new APIFunctionality
{
Name = "19",
Description = "Decompose a view into multiple accessibility elements",
Availability = "Not available on XAMARIN",
});
accessibilityTree.Add(new APIFunctionality
{
Name = "20",
Description = "Get the parent accessible element",
Availability = "Not available on XAMARIN",
});
miscellanous.Add(new APIFunctionality
{
Name = "21",
Description = "Detect whether screen-reader is active",
Availability = "Indirect implementation",
});
miscellanous.Add(new APIFunctionality
{
Name = "22",
Description = "Support navigation by specifying which views are headers or panes",
Availability = "Not available on iOS",
});
miscellanous.Add(new APIFunctionality
{
Name = "23",
Description = "Define how to respond to user actions that are only available when the screen reader is active",
Availability = "Not available on Android",
});
miscellanous.Add(new APIFunctionality
{
Name = "24",
Description = "Perform actions on user behalf",
Availability = "Not available on XAMARIN",
});
miscellanous.Add(new APIFunctionality
{
Name = "25",
Description = "Associate arbitrary accessibility-related information to a view",
Availability = "Not available on XAMARIN",
});
APIList.Add(accessibilityFocus);
APIList.Add(TextToAnnounce);
APIList.Add(explicitTTS);
APIList.Add(accessibilityTree);
APIList.Add(miscellanous);
listView.ItemsSource = APIList;
listView.IsGroupingEnabled = true;
listView.GroupDisplayBinding = new Binding("LongName");
listView.GroupShortNameBinding = new Binding("ShortName");
}
}
}
<?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="SampleApp.Views.Functionality1" xmlns:local="clr-namespace:SampleApp;assembly=SampleApp">
<ContentPage.Content>
<StackLayout>
<Image Source="{local:ImageResource SampleApp.images.fork.png}" x:Name="forkImage"></Image>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<Label Text="Above image is Accessible"></Label>
<Switch IsToggled="True" Toggled="OnToggled"></Switch>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms;
namespace SampleApp.Views
{
[DesignTimeVisible(false)]
public partial class Functionality1 : ContentPage
{
public Functionality1()
{
InitializeComponent();
AutomationProperties.SetIsInAccessibleTree(forkImage, true);
AutomationProperties.SetName(forkImage, "fork image");
}
void OnToggled(object sender, ToggledEventArgs e)
{
// Perform an action after examining e.Value
if(e.Value)
{
AutomationProperties.SetIsInAccessibleTree(forkImage, true);
}
else
{
AutomationProperties.SetIsInAccessibleTree(forkImage, false);
}
}
}
}
<?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="SampleApp.Views.Functionality10">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality10 : ContentPage
{
public Functionality10()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality11">
<ContentPage.Content>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Label x:Name="label" Text="The text to speech will be read by the screen reader." HorizontalTextAlignment="Center"></Label>
<Button Clicked="Button_Clicked" Text="Read the text above" x:Name="button"></Button>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SampleApp.DependencyServices;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality11 : ContentPage
{
IReadText readText;
public Functionality11()
{
InitializeComponent();
readText = DependencyService.Get<IReadText>();
AutomationProperties.SetIsInAccessibleTree(label, true);
AutomationProperties.SetIsInAccessibleTree(button, true);
}
void Button_Clicked(System.Object sender, System.EventArgs e)
{
readText.ReadText(label);
}
}
}
<?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="SampleApp.Views.Functionality12">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality12 : ContentPage
{
public Functionality12()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality13">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality13 : ContentPage
{
public Functionality13()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality14">
<ContentPage.Content>
<Grid VerticalOptions="Center" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="auto" ></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<Label Text="Text 1: this is text number one." Grid.Row="0" x:Name="TextToRead"></Label>
<Button Text="Read Text 1 with screen reader off" Grid.Row="1" Clicked="Button_Clicked"></Button>
</Grid>
</ContentPage.Content>
</ContentPage>
using Xamarin.Essentials;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality14 : ContentPage
{
public Functionality14()
{
InitializeComponent();
}
void Button_Clicked(System.Object sender, System.EventArgs e)
{
TextToSpeech.SpeakAsync(TextToRead.Text);
}
}
}
<?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="SampleApp.Views.Functionality15">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality15 : ContentPage
{
public Functionality15()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality16">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality16 : ContentPage
{
public Functionality16()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality17">
<ContentPage.Content>
<StackLayout VerticalOptions="Center" HorizontalOptions="CenterAndExpand">
<Label Text="This is an example text." Margin="50" x:Name="TextToRead"></Label>
<StackLayout>
<Label Text="Change the volume"></Label>
<Slider Minimum="0.0" Maximum="1.0" ValueChanged="Slider_Volume_ValueChanged" Value="0.5"></Slider>
</StackLayout>
<StackLayout>
<Label Text="Change the pitch"></Label>
<Slider Minimum="0.1" Maximum="2.0" ValueChanged="Slider_Pitch_ValueChanged" Value="1.0"></Slider>
</StackLayout>
<Button Text="Read the example text" Clicked="Button_Clicked"></Button>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Essentials;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality17 : ContentPage
{
float volume;
float pitch;
public Functionality17()
{
InitializeComponent();
volume = 0.5f;
pitch = 1.0f;
}
void Slider_Volume_ValueChanged(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
{
volume = Convert.ToSingle(e.NewValue);
var settings = new SpeechOptions()
{
Volume = Convert.ToSingle(e.NewValue)
};
}
void Slider_Pitch_ValueChanged(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
{
pitch = Convert.ToSingle(e.NewValue);
var settings = new SpeechOptions()
{
Pitch = Convert.ToSingle(e.NewValue)
};
}
void Button_Clicked(System.Object sender, System.EventArgs e)
{
var settings = new SpeechOptions()
{
Volume = volume,
Pitch = pitch
};
TextToSpeech.SpeakAsync(TextToRead.Text, settings);
}
}
}
<?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="SampleApp.Views.Functionality18">
<ContentPage.Content>
<StackLayout x:Name="background">
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality18 : ContentPage
{
StackLayout aggregateElements;
Label agg1, agg2, agg3;
public Functionality18()
{
InitializeComponent();
background.Padding = 10;
//container for the aggregated views
aggregateElements = new StackLayout
{
BackgroundColor = Color.DarkMagenta,
HeightRequest = 150,
Padding = 10,
};
AutomationProperties.SetIsInAccessibleTree(aggregateElements, true);
//the container that aggregates the views has to be accessible, setting his "AutomationProperties.IsInAccessibleTree" property to true
if (Device.RuntimePlatform == Device.Android)
{
AutomationProperties.SetIsInAccessibleTree(aggregateElements, true);
}
background.Children.Add(aggregateElements);
//here I create the single views to be aggregated into one single element
//all the "Label" in Xamarin have "AutomationProperties.IsInAccessibleTree" property setted to false by default
agg1 = new Label
{
Text = "View number 1",
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg1, false);
agg2 = new Label
{
Text = "View number 2",
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg2, false);
agg3 = new Label
{
Text = "This three different texts (views) have been grouped together, and will be seen as a single element.",
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg3, false);
aggregateElements.Children.Add(agg1);
aggregateElements.Children.Add(agg2);
aggregateElements.Children.Add(agg3);
}
private void groupAccessibleItems(Layout container)
{
String desc = "";
foreach (Label l in container.Children)
{
Console.WriteLine($"PIPPO: id={l.Text}");
AutomationProperties.SetIsInAccessibleTree(l, false);
desc += l.Text;
}
Console.WriteLine($"PIPPO: totaldesc={desc}");
AutomationProperties.SetIsInAccessibleTree(container, true);
AutomationProperties.SetName(container, desc);
}
protected override void OnAppearing()
{
if (Device.RuntimePlatform == Device.iOS)
{
groupAccessibleItems(aggregateElements);
}
}
}
}
<?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="SampleApp.Views.Functionality19">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality19 : ContentPage
{
public Functionality19()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality2">
<ContentPage.Content>
<Grid Margin="10,50">
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label x:Name="FocusOrderLabel" Grid.Row="0" Grid.ColumnSpan="4"></Label>
<Label x:Name="label1" Text="1" Grid.Row="1" Grid.Column="0" BackgroundColor="AliceBlue" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"></Label>
<Label x:Name="label2" Text="2" Grid.Row="2" Grid.Column="2" BackgroundColor="AntiqueWhite" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"></Label>
<Label x:Name="label3" Text="3" Grid.Row="3" Grid.Column="1" BackgroundColor="LightYellow" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"></Label>
<Label x:Name="label4" Text="4" Grid.Row="4" Grid.Column="3" BackgroundColor="LightCoral" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"></Label>
<Button Text="Change focus order to left-right" Grid.Row="5" Grid.ColumnSpan="4" BackgroundColor="Blue" TextColor="White" Clicked="OnButtonClicked" x:Name="ChangeButton"></Button>
</Grid>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality2 : ContentPage
{
Boolean topDown = true;
public Functionality2()
{
InitializeComponent();
FocusOrderLabel.Text = "Focus order is: TOP-DOWN";
AutomationProperties.SetIsInAccessibleTree(FocusOrderLabel, true);
AutomationProperties.SetIsInAccessibleTree(label1, true);
AutomationProperties.SetIsInAccessibleTree(label2, true);
AutomationProperties.SetIsInAccessibleTree(label3, true);
AutomationProperties.SetIsInAccessibleTree(label4, true);
AutomationProperties.SetIsInAccessibleTree(ChangeButton, true);
label1.TabIndex = 1;
label2.TabIndex = 2;
label3.TabIndex = 3;
label4.TabIndex = 4;
ChangeButton.TabIndex = 5;
}
async void OnButtonClicked(object sender, EventArgs args)
{
if (topDown)
{
label2.Text = "3";
label2.TabIndex = 3;
label3.Text = "2";
label3.TabIndex = 2;
ChangeButton.Text = "Change focus order to top-down";
FocusOrderLabel.Text = "Focus order is: LEFT-RIGHT";
}
else
{
label2.Text = "2";
label2.TabIndex = 2;
label3.Text = "3";
label3.TabIndex = 3;
ChangeButton.Text = "Change focus order to left-right";
FocusOrderLabel.Text = "Focus order is: TOP-DOWN";
}
topDown = !topDown;
}
}
}
<?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="SampleApp.Views.Functionality20">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality20 : ContentPage
{
public Functionality20()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality21">
<StackLayout x:Name="background" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
</StackLayout>
</ContentPage>
using System;
using System.Collections.Generic;
using SampleApp.DependencyServices;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality21 : ContentPage
{
IScreenReaderEnabled screenReaderEnabled;
public Functionality21()
{
InitializeComponent();
screenReaderEnabled = DependencyService.Resolve<IScreenReaderEnabled>();
Label q = new Label
{
Text = "Is Screen Reader Active?",
};
Label y = new Label
{
Text = "",
TextColor = Color.Green,
};
Label n = new Label
{
Text = "",
TextColor = Color.Red,
};
background.Children.Add(q);
background.Children.Add(y);
background.Children.Add(n);
AutomationProperties.SetIsInAccessibleTree(q, true);
AutomationProperties.SetIsInAccessibleTree(y, true);
AutomationProperties.SetIsInAccessibleTree(n, true);
if (screenReaderEnabled.IsScreenReaderEnabled())
{
y.Text = "YES";
}
else
{
n.Text = "NO";
}
}
}
}
<?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="SampleApp.Views.Functionality22">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="" x:Name="labelAv" HorizontalTextAlignment="Center"></Label>
<Label Text="Click on show header button to check witch view is header" x:Name="label1" HorizontalTextAlignment="Center"></Label>
<Label Text="Click on show pane button to check witch view has a pane title" x:Name="label2" HorizontalTextAlignment="Center"></Label>
<Button Text="Show header" Clicked="Button_Clicked" x:Name="button1"></Button>
<Button Text="Show pane" Clicked="Button_Clicked1" x:Name="button2"></Button>
</StackLayout>
</ContentPage>
using System;
using System.Collections.Generic;
using SampleApp.DependencyServices;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality22 : ContentPage
{
IAccessibilityHeading Heading;
IAccessibilityPane Pane;
public Functionality22()
{
InitializeComponent();
Heading = DependencyService.Get<IAccessibilityHeading>();
Pane = DependencyService.Get<IAccessibilityPane>();
if (Device.RuntimePlatform == Device.iOS)
{
labelAv.Text = "NOT AVAILABLE ON iOS";
}
AutomationProperties.SetIsInAccessibleTree(label1,true);
AutomationProperties.SetIsInAccessibleTree(label2,true);
AutomationProperties.SetIsInAccessibleTree(button1,true);
AutomationProperties.SetIsInAccessibleTree(button2, true);
}
//SHOW HEADER BUTTON CLICKED
void Button_Clicked(System.Object sender, System.EventArgs e)
{
if (Device.RuntimePlatform == Device.Android)
{
if (Heading.CheckHeading(label1))
{
string labelValue = label1.Text;
label1.Text = "HEADER";
//reset label value after 3 seconds
Device.StartTimer(TimeSpan.FromMilliseconds(3000.0), () =>
{
label1.Text = labelValue;
return false; // runs again, or false to stop
});
}
}
}
//SHOW PANE BUTTON CLICKED
void Button_Clicked1(System.Object sender, System.EventArgs e)
{
if (Device.RuntimePlatform == Device.Android)
{
if (Pane.CheckPane(label2))
{
string labelValue = label2.Text;
label2.Text = "PANE";
//reset label value after 3 seconds
Device.StartTimer(TimeSpan.FromMilliseconds(3000.0), () =>
{
label2.Text = labelValue;
return false; // runs again, or false to stop
});
}
}
}
protected override void OnAppearing()
{
base.OnAppearing();
//only Android has this function
if (Device.RuntimePlatform == Device.Android)
{
Heading.SetHeading(label1);
Pane.SetPane(label2, "PaneTitle");
}
}
}
}
<?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="SampleApp.Views.Functionality23">
<StackLayout x:Name="background" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
</StackLayout>
</ContentPage>
using System;
using System.Collections.Generic;
using SampleApp.CustomRenderers;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality23 : ContentPage
{
public static CustomView customEditor = new CustomView { Text = "", HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand};
public Functionality23()
{
InitializeComponent();
if (Device.RuntimePlatform == Device.Android)
{
customEditor.Text = "NOT AVAILABLE ON Android";
}
AutomationProperties.SetIsInAccessibleTree(customEditor, true);
background.Children.Add(customEditor);
}
}
}
<?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="SampleApp.Views.Functionality24">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality24 : ContentPage
{
public Functionality24()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality3">
<ContentPage.Content>
<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Label Text="Click the button below" x:Name="label"></Label>
<Button Clicked="Button_Clicked" Text="Assign focus to the label above" x:Name="button"></Button>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using SampleApp.DependencyServices;
namespace SampleApp.Views
{
public partial class Functionality3 : ContentPage
{
IAssignFocus assignFocus;
IScreenReaderEnabled screenReaderEnabled;
Boolean focus = true;
public Functionality3()
{
InitializeComponent();
assignFocus = DependencyService.Get<IAssignFocus>();
screenReaderEnabled = DependencyService.Resolve<IScreenReaderEnabled>();
AutomationProperties.SetIsInAccessibleTree(label, true);
}
void Button_Clicked(System.Object sender, System.EventArgs e)
{
if (screenReaderEnabled.IsScreenReaderEnabled())
{
if (focus)
{
assignFocus.AssignFocus(label);
label.Text = "I Have Focus";
button.Text = "Reset";
}
else
{
assignFocus.AssignFocus(button);
label.Text = "I Don't Have Focus";
button.Text = "Assign focus to the label above";
}
focus = !focus;
}
}
}
}
<?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="SampleApp.Views.Functionality4" xmlns:local="clr-namespace:SampleApp;assembly=SampleApp" xmlns:local1="clr-namespace:SampleApp.Models">
<StackLayout VerticalOptions="CenterAndExpand" x:Name="background" HorizontalOptions="CenterAndExpand">
</StackLayout>
</ContentPage>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using SampleApp.CustomRenderers;
using Xamarin.Forms;
namespace SampleApp.Views
{
[DesignTimeVisible(false)]
public partial class Functionality4 : ContentPage
{
public static Label myLabel = new Label { Text = "Select the Bell Image with the accessibility focus", HorizontalOptions = LayoutOptions.CenterAndExpand};
public Functionality4()
{
InitializeComponent();
// immagine campanello
CustomImage BellImage = new CustomImage
{
Source = ImageSource.FromResource("SampleApp.images.bell.png", typeof(Functionality4).GetTypeInfo().Assembly)
};
AutomationProperties.SetIsInAccessibleTree(myLabel, true);
AutomationProperties.SetIsInAccessibleTree(BellImage, true);
AutomationProperties.SetName(BellImage, "Bell Image");
background.Children.Add(myLabel);
background.Children.Add(BellImage);
}
}
}
<?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="SampleApp.Views.Functionality5" xmlns:local="clr-namespace:SampleApp;assembly=SampleApp">
<StackLayout x:Name="background">
<Image Source="{local:ImageResource SampleApp.images.bell.png}" x:Name="bellImage"></Image>
</StackLayout>
</ContentPage>
using System;
using System.Reflection;
using SampleApp.DependencyServices;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality5 : ContentPage
{
//label
Label label= new Label { Text = "Does the Bell's Image Have the Focus?", HorizontalOptions = LayoutOptions.CenterAndExpand };
Label labelYN = new Label { Text = "YES/ NO", HorizontalOptions = LayoutOptions.CenterAndExpand };
Label infoLabel = new Label { Text = "i: This view updates every 2 seconds", HorizontalOptions = LayoutOptions.CenterAndExpand, Margin = new Thickness(0, 200) };
IIsFocused dependency;
bool onView = true;
public Functionality5()
{
InitializeComponent();
dependency = DependencyService.Get<IIsFocused>();
background.Children.Add(label);
background.Children.Add(labelYN);
background.Children.Add(infoLabel);
AutomationProperties.SetIsInAccessibleTree(label, true);
AutomationProperties.SetIsInAccessibleTree(labelYN, true);
AutomationProperties.SetIsInAccessibleTree(infoLabel, true);
AutomationProperties.SetIsInAccessibleTree(bellImage, true);
AutomationProperties.SetHelpText(bellImage, "Bell Image");
// timer che si ripete ogni 2 secondi
Device.StartTimer(TimeSpan.FromSeconds(2.0), () =>
{
if (onView)
{
Console.WriteLine("TIMER FIRED");
Device.BeginInvokeOnMainThread(() =>
{
if (dependency.isFocused(bellImage))
{
Console.WriteLine("is focused");
labelYN.TextColor = Color.Green;
labelYN.Text = "YES";
}
else
{
Console.WriteLine("is NOT focused");
labelYN.TextColor = Color.Red;
labelYN.Text = "NO";
}
});
return true; // timer runs again
}
return false; //timer stops
});
}
//stop the timer when view changes
protected override void OnDisappearing()
{
base.OnDisappearing();
onView = false;
}
}
}
<?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="SampleApp.Views.Functionality6" xmlns:local="clr-namespace:SampleApp;assembly=SampleApp">
<ContentPage.Content>
<StackLayout>
<Image Source="{local:ImageResource SampleApp.images.fork.png}" x:Name="forkImage"></Image>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Entry Placeholder="Text-To-Announce (NAME)" x:Name="entryName" TextChanged="EntryName_TextChanged"></Entry>
</StackLayout>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Entry Placeholder="Text-To-Announce (HELP TEXT)" x:Name="entryHelpText" TextChanged="EntryHelpText_TextChanged"></Entry>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality6 : ContentPage
{
public Functionality6()
{
InitializeComponent();
AutomationProperties.SetIsInAccessibleTree(forkImage, true);
}
void EntryName_TextChanged(object sender, TextChangedEventArgs e)
{
AutomationProperties.SetName(forkImage, e.NewTextValue);
}
void EntryHelpText_TextChanged(object sender, TextChangedEventArgs e)
{
AutomationProperties.SetHelpText(forkImage, e.NewTextValue);
}
}
}
<?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="SampleApp.Views.Functionality7">
<ContentPage.Content>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality7 : ContentPage
{
public Functionality7()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.Functionality8">
<ContentPage.Content>
<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Label x:Name="label" Text="This is the TextField description" />
<Entry x:Name="entry"></Entry>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality8 : ContentPage
{
public Functionality8()
{
InitializeComponent();
AutomationProperties.SetIsInAccessibleTree(label, true);
AutomationProperties.SetIsInAccessibleTree(entry, true);
// this only works on Android
AutomationProperties.SetLabeledBy(entry, label);
//iOS
if (Device.RuntimePlatform == Device.iOS)
{
AutomationProperties.SetName(entry, label.Text);
}
}
}
}
<?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="SampleApp.Views.Functionality9">
<ContentPage.Content>
<Label Text="Not available on XAMARIN"></Label>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class Functionality9 : ContentPage
{
public Functionality9()
{
InitializeComponent();
}
}
}
<?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="SampleApp.Views.FunctionalityTest">
<ContentPage.Content>
<StackLayout>
<Label x:Name="NameToDisplay"></Label>
<Label x:Name="DescriptionToDisplay"></Label>
</StackLayout>
</ContentPage.Content>
</ContentPage>
using System;
using System.Collections.Generic;
using SampleApp.ViewModels;
using Xamarin.Forms;
namespace SampleApp.Views
{
public partial class FunctionalityTest : ContentPage
{
public FunctionalityTest(String Name, String Description)
{
InitializeComponent();
this.BindingContext = this;
NameToDisplay.Text = "API: " + Name;
DescriptionToDisplay.Text = Description;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="SampleApp.MainPage">
<StackLayout>
<ListView ItemsSource="{Binding APIList}"
ItemTapped="OnListViewItemTapped"
IsGroupingEnabled="True"
GroupDisplayBinding="{Binding LongName}"
GroupShortNameBinding="{Binding ShortName}"
RowHeight="100"
>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout BackgroundColor="#fff" Orientation="Vertical" Padding="10, 0, 0, 0">
<StackLayout Orientation="Vertical" VerticalOptions="CenterAndExpand">
<Label Text="{Binding Description}" TextColor="Black" FontSize="Default"/>
<Label Text="{Binding Availability}" HorizontalOptions="FillAndExpand" TextColor="#999" FontSize="Micro"/>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell>
<StackLayout BackgroundColor="#eee" Orientation="Vertical" Padding="10, 0, 0, 0">
<StackLayout VerticalOptions="CenterAndExpand">
<Label Text="{Binding LongName}" TextColor="#333" FontSize="Medium"/>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
</ListView>
</StackLayout>
</ContentPage>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SampleApp.ViewModels;
using SampleApp.Views;
using Xamarin.Forms;
namespace SampleApp
{
// Learn more about making custom code visible in the Xamarin.Forms previewer
// by visiting https://aka.ms/xamarinforms-previewer
[DesignTimeVisible(false)]
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
BindingContext = new ListPageViewModel();
}
private async void OnListViewItemTapped(object sender, ItemTappedEventArgs e)
{
var details = e.Item as APIFunctionality;
if (sender is ListView lv) lv.SelectedItem = null;
switch (details.Name)
{
case "1":
await Navigation.PushAsync(new Functionality1());
break;
case "2":
await Navigation.PushAsync(new Functionality2());
break;
case "3":
await Navigation.PushAsync(new Functionality3());
break;
case "4":
await Navigation.PushAsync(new Functionality4());
break;
case "5":
await Navigation.PushAsync(new Functionality5());
break;
case "6":
await Navigation.PushAsync(new Functionality6());
break;
case "7":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality7());
break;
case "8":
await Navigation.PushAsync(new Functionality8());
break;
case "9":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality9());
break;
case "10":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality10());
break;
case "11":
await Navigation.PushAsync(new Functionality11());
break;
case "12":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality12());
break;
case "13":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality13());
break;
case "14":
await Navigation.PushAsync(new Functionality14());
break;
case "15":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality15());
break;
case "16":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality16());
break;
case "17":
await Navigation.PushAsync(new Functionality17());
break;
case "18":
await Navigation.PushAsync(new Functionality18());
break;
case "19":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality19());
break;
case "20":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality20());
break;
case "21":
await Navigation.PushAsync(new Functionality21());
break;
case "22":
await Navigation.PushAsync(new Functionality22());
break;
case "23":
await Navigation.PushAsync(new Functionality23());
break;
case "24":
// TO IMPLEMENT
//await Navigation.PushAsync(new Functionality24());
break;
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment