Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MobileScreenReadersApi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public_accessibility_software
MobileScreenReadersApi
Commits
25a970e3
Commit
25a970e3
authored
Sep 12, 2020
by
Mattia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug fun4
parent
4d3d99dc
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
91 additions
and
45 deletions
+91
-45
UserPrefs.xml
...ccessibility/.vs/CustomViewAccessibility/xs/UserPrefs.xml
+29
-0
CustomViewAccessibility-Debug.json
...ility/xs/project-cache/CustomViewAccessibility-Debug.json
+1
-0
CustomViewAccessibility.Android-Debug.json
.../project-cache/CustomViewAccessibility.Android-Debug.json
+1
-0
CustomViewAccessibility.iOS-Debug|iPhoneSimulator.json
...he/CustomViewAccessibility.iOS-Debug|iPhoneSimulator.json
+1
-0
Resource.designer.cs
...mViewAccessibility.Android/Resources/Resource.designer.cs
+0
-1
iOSFocusEvents.cs
SampleApp/SampleApp.iOS/iOSFocusEvents.cs
+6
-4
iOSHasFocus.cs
SampleApp/SampleApp.iOS/iOSHasFocus.cs
+38
-24
Functionality4.xaml
SampleApp/SampleApp/Views/Functionality4.xaml
+1
-7
Functionality4.xaml.cs
SampleApp/SampleApp/Views/Functionality4.xaml.cs
+11
-7
Functionality5.xaml.cs
SampleApp/SampleApp/Views/Functionality5.xaml.cs
+3
-2
No files found.
AccessibleView/XAMARINCustomViewAccessibility/.vs/CustomViewAccessibility/xs/UserPrefs.xml
0 → 100644
View file @
25a970e3
<Properties
StartupConfiguration=
"{784FCD54-187B-4098-BD87-559640B3EA57}|Default"
>
<MonoDevelop.Ide.Workbench
ActiveDocument=
"CustomViewAccessibility.iOS/IOSAccessibleButton.cs"
>
<Files>
<File
FileName=
"CustomViewAccessibility/MainPage.xaml.cs"
Line=
"1"
Column=
"1"
/>
<File
FileName=
"CustomViewAccessibility.iOS/IOSAccessibleButton.cs"
Line=
"47"
Column=
"41"
/>
</Files>
<Pads>
<Pad
Id=
"ProjectPad"
>
<State
name=
"__root__"
>
<Node
name=
"CustomViewAccessibility"
expanded=
"True"
>
<Node
name=
"CustomViewAccessibility"
expanded=
"True"
>
<Node
name=
"MainPage.xaml"
expanded=
"True"
/>
</Node>
<Node
name=
"CustomViewAccessibility.iOS"
expanded=
"True"
>
<Node
name=
"IOSAccessibleButton.cs"
selected=
"True"
/>
</Node>
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.PinnedWatches
/>
<MonoDevelop.Ide.Workspace
ActiveConfiguration=
"Debug"
/>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore
/>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations
/>
<MonoDevelop.Ide.ItemProperties.CustomViewAccessibility.Android
PreferredExecutionTarget=
"Android.pixel_2_q_10_0_-_api_29"
/>
</Properties>
\ No newline at end of file
AccessibleView/XAMARINCustomViewAccessibility/.vs/CustomViewAccessibility/xs/project-cache/CustomViewAccessibility-Debug.json
0 → 100644
View file @
25a970e3
This diff is collapsed.
Click to expand it.
AccessibleView/XAMARINCustomViewAccessibility/.vs/CustomViewAccessibility/xs/project-cache/CustomViewAccessibility.Android-Debug.json
0 → 100644
View file @
25a970e3
This diff is collapsed.
Click to expand it.
AccessibleView/XAMARINCustomViewAccessibility/.vs/CustomViewAccessibility/xs/project-cache/CustomViewAccessibility.iOS-Debug|iPhoneSimulator.json
0 → 100644
View file @
25a970e3
This diff is collapsed.
Click to expand it.
AccessibleView/XAMARINCustomViewAccessibility/CustomViewAccessibility.Android/Resources/Resource.designer.cs
View file @
25a970e3
...
...
@@ -2,7 +2,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
...
...
SampleApp/SampleApp.iOS/iOSFocusEvents.cs
View file @
25a970e3
...
...
@@ -3,6 +3,8 @@ using SampleApp.DependencyServices;
using
Xamarin.Forms
;
using
SampleApp.iOS
;
using
Xamarin.Forms.Platform.iOS
;
using
SampleApp.Views
;
using
SampleApp.Models
;
[assembly: ExportRenderer(typeof(IFocusEvents), typeof(iOSFocusEvents))]
namespace
SampleApp.iOS
...
...
@@ -41,14 +43,14 @@ namespace SampleApp.iOS
{
base
.
AccessibilityElementDidBecomeFocused
();
Console
.
WriteLine
(
"Ding Dong"
);
Functionality4
.
myLabel
.
Text
=
"Bell Image Has Focus"
;
}
public
override
void
AccessibilityElementDidLoseFocus
()
{
base
.
AccessibilityElementDidLoseFocus
();
Console
.
WriteLine
(
"Campanello ha perso il focus"
)
;
Functionality4
.
myLabel
.
Text
=
"Bell Image does not have focus"
;
}
...
...
SampleApp/SampleApp.iOS/iOSHasFocus.cs
View file @
25a970e3
...
...
@@ -19,37 +19,51 @@ namespace SampleApp.iOS
{
base
.
OnElementChanged
(
e
);
if
(
Control
!=
null
)
if
(
Control
!=
null
)
{
Task
.
Delay
(
3000
).
ContinueWith
((
arg
)
=>
{
Device
.
BeginInvokeOnMainThread
(()
=>
{
Console
.
WriteLine
(
Control
.
AccessibilityElementIsFocused
().
ToString
());
if
(
Control
.
AccessibilityElementIsFocused
())
{
Control
.
Text
=
"Focus"
;
SetNativeControl
(
new
AccessibleLabel
());
}
else
{
Control
.
Text
=
"Not in focus"
;
}
});
});
}
}
public
class
AccessibleLabel
:
UILabel
{
public
AccessibleLabel
()
:
base
()
{
Console
.
WriteLine
(
"ACCESSIBLE LABEL CREATED"
);
if
(
AccessibilityElementIsFocused
())
{
this
.
Text
=
"focus"
;
Console
.
WriteLine
(
"accessibilityelementisfocused"
);
}
else
{
this
.
Text
=
"NOTinfocus"
;
Console
.
WriteLine
(
"accessibilityelementisNOTinfocus"
);
}
}
public
override
bool
AccessibilityElementIsFocused
()
{
if
(
base
.
AccessibilityElementIsFocused
())
{
return
true
;
}
else
{
return
false
;
}
}
}
}
}
SampleApp/SampleApp/Views/Functionality4.xaml
View file @
25a970e3
<?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"
>
<ContentPage.BindingContext>
</ContentPage.BindingContext>
<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"
>
<Label
Text=
"Bell Image does not have focus"
x:Name=
"infoLabel"
></Label>
</StackLayout>
</ContentPage>
SampleApp/SampleApp/Views/Functionality4.xaml.cs
View file @
25a970e3
...
...
@@ -11,23 +11,27 @@ namespace SampleApp.Views
[
DesignTimeVisible
(
false
)]
public
partial
class
Functionality4
:
ContentPage
{
public
Label
InfoLabel
{
get
;
set
;
}
public
static
Label
myLabel
=
new
Label
{
Text
=
"Select the Bell Image with the accessibility focus"
,
HorizontalOptions
=
LayoutOptions
.
CenterAndExpand
};
public
Functionality4
()
{
InitializeComponent
();
// immagine campanello
IFocusEvents
BellImage
=
new
IFocusEvents
{
Source
=
ImageSource
.
FromResource
(
"SampleApp.images.bell.png"
,
typeof
(
Functionality4
).
GetTypeInfo
().
Assembly
)
};
AutomationProperties
.
SetIsInAccessibleTree
(
infoLabel
,
true
);
AutomationProperties
.
SetIsInAccessibleTree
(
myLabel
,
true
);
AutomationProperties
.
SetIsInAccessibleTree
(
BellImage
,
true
);
AutomationProperties
.
SetName
(
BellImage
,
"Bell Image"
);
background
.
Children
.
Add
(
myLabel
);
background
.
Children
.
Add
(
BellImage
);
}
}
}
SampleApp/SampleApp/Views/Functionality5.xaml.cs
View file @
25a970e3
...
...
@@ -17,13 +17,14 @@ namespace SampleApp.Views
CustomLabel
label
=
new
CustomLabel
{
Text
=
"Focus?"
,
HorizontalOptions
=
LayoutOptions
.
Center
,
VerticalOptions
=
LayoutOptions
.
Center
};
background
.
Children
.
Add
(
label
);
AutomationProperties
.
SetIsInAccessibleTree
(
label
,
true
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment