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
75412a54
Commit
75412a54
authored
Apr 24, 2020
by
Paolo Pecis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished Xamarin Custom Action
parent
54b2e11e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
17 deletions
+40
-17
UserPrefs.xml
...ARINCustomAction/.vs/XAMARINCustomAction/xs/UserPrefs.xml
+4
-6
XAMARINCustomAction-Debug.json
...tomAction/xs/project-cache/XAMARINCustomAction-Debug.json
+1
-1
XAMARINCustomAction.iOS-Debug|iPhone.json
...s/project-cache/XAMARINCustomAction.iOS-Debug|iPhone.json
+1
-1
CustomActionIos.cs
...INCustomAction/XAMARINCustomAction.iOS/CustomActionIos.cs
+33
-8
MainPage.xaml.cs
.../XAMARINCustomAction/XAMARINCustomAction/MainPage.xaml.cs
+1
-1
No files found.
CustomAction/XAMARINCustomAction/.vs/XAMARINCustomAction/xs/UserPrefs.xml
View file @
75412a54
...
...
@@ -3,16 +3,14 @@
<Files>
<File
FileName=
"XAMARINCustomAction/MainPage.xaml.cs"
Line=
"23"
Column=
"50"
/>
<File
FileName=
"XAMARINCustomAction/ICustomAction.cs"
/>
<File
FileName=
"XAMARINCustomAction.iOS/CustomActionIos.cs"
Line=
"
31"
Column=
"17
"
/>
<File
FileName=
"XAMARINCustomAction.iOS/CustomActionIos.cs"
Line=
"
22"
Column=
"6
"
/>
<File
FileName=
"XAMARINCustomAction.iOS/Info.plist"
/>
</Files>
<Pads>
<Pad
Id=
"ProjectPad"
>
<State
name=
"__root__"
>
<Node
name=
"XAMARINCustomAction"
expanded=
"True"
>
<Node
name=
"XAMARINCustomAction"
expanded=
"True"
>
<Node
name=
"MainPage.xaml"
expanded=
"True"
/>
</Node>
<Node
name=
"XAMARINCustomAction"
expanded=
"True"
/>
<Node
name=
"XAMARINCustomAction.iOS"
expanded=
"True"
>
<Node
name=
"CustomActionIos.cs"
selected=
"True"
/>
</Node>
...
...
@@ -21,12 +19,12 @@
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.ItemProperties.XAMARINCustomAction.Android
AndroidDesignerPreferredTheme=
"Theme.AppCompat.Light.NoActionBar"
FirstBuild=
"True"
PreferredExecutionTarget=
"Android.galaxy_s9"
/>
<MonoDevelop.Ide.ItemProperties.XAMARINCustomAction.Android
AndroidDesignerPreferredTheme=
"Theme.AppCompat.Light.NoActionBar"
PreferredExecutionTarget=
"Android.galaxy_s9"
/>
<MonoDevelop.Ide.DebuggingService.PinnedWatches
/>
<MonoDevelop.Ide.Workspace
ActiveConfiguration=
"Debug"
/>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore
/>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations
/>
<MonoDevelop.Ide.ItemProperties.XAMARINCustomAction.iOS
automaticSigning=
"False"
PreferredExecutionTarget=
"MonoDevelop.IPhone.IPhoneSimulatorTarget.
460FFED4-D83A-483B-AAED-00139629E88A
"
/>
<MonoDevelop.Ide.ItemProperties.XAMARINCustomAction.iOS
automaticSigning=
"False"
PreferredExecutionTarget=
"MonoDevelop.IPhone.IPhoneSimulatorTarget.
6A0D46CD-3857-45D7-84A7-211D7D713F41
"
/>
</Properties>
\ No newline at end of file
CustomAction/XAMARINCustomAction/.vs/XAMARINCustomAction/xs/project-cache/XAMARINCustomAction-Debug.json
View file @
75412a54
This diff is collapsed.
Click to expand it.
CustomAction/XAMARINCustomAction/.vs/XAMARINCustomAction/xs/project-cache/XAMARINCustomAction.iOS-Debug|iPhone.json
View file @
75412a54
This diff is collapsed.
Click to expand it.
CustomAction/XAMARINCustomAction/XAMARINCustomAction.iOS/CustomActionIos.cs
View file @
75412a54
...
...
@@ -19,28 +19,53 @@ namespace XAMARINCustomAction.iOS
mainpage
=
page
;
var
iospage
=
page
.
GetRenderer
().
ViewController
;
UIAccessibilityCustomAction
up
=
new
UIAccessibilityCustomAction
(
name
:
"Increment"
,
target
:
iospage
,
selector
:
new
Selector
(
"Increment:"
)
);
UIAccessibilityCustomAction
down
=
new
UIAccessibilityCustomAction
(
name
:
"Decrement"
,
target
:
iospage
,
selector
:
new
Selector
(
"Decrement:"
)
);
UIAccessibilityCustomAction
up
=
new
UIAccessibilityCustomAction
(
"Increment"
,
actionHandler
:
Increment
);
UIAccessibilityCustomAction
down
=
new
UIAccessibilityCustomAction
(
"Decrement"
,
actionHandler
:
Decrement
);
iospage
.
AccessibilityCustomActions
=
new
UIAccessibilityCustomAction
[
2
]
{
up
,
down
};
Debug
.
WriteLine
(
$"PIPPO: DS, counter =
{
MainPage
.
counter
.
Text
}
"
);
}
[
Export
(
"Increment:"
)]
private
void
Increment
()
private
bool
Increment
(
UIAccessibilityCustomAction
customAction
)
{
int
n
=
Int32
.
Parse
(
MainPage
.
counter
.
Text
)
+
1
;
Debug
.
WriteLine
(
"PIPPO: clicked increment"
);
MainPage
.
counter
.
Text
=
""
+
(
n
);
return
true
;
}
private
bool
Decrement
(
UIAccessibilityCustomAction
customAction
)
{
int
n
=
Int32
.
Parse
(
MainPage
.
counter
.
Text
);
if
(
n
<=
0
)
{
return
false
;
}
Debug
.
WriteLine
(
"PIPPO: clicked decrement"
);
n
--;
MainPage
.
counter
.
Text
=
""
+
(
n
);
return
true
;
}
/*private bool Increment()
{
int n = Int32.Parse(mainpage.counter.Text);
Console
.
WriteLine
(
$"PIPPO: clicked on increment
{
n
}
"
);
Console.WriteLine(
"PIPPO: clicked on increment
");
Debug.WriteLine($"PIPPO: clicked on increment {n}");
mainpage.counter.Text = "" + (n++);
}
[
Export
(
"Decrement:"
)]
}*/
/*[Export("Decrement:")]
private void Decrement()
{
Console.WriteLine("PIPPO: clicked on decrement");
int n = Int32.Parse(mainpage.counter.Text);
mainpage.counter.Text = "" + (n--);
}
}
*/
}
}
CustomAction/XAMARINCustomAction/XAMARINCustomAction/MainPage.xaml.cs
View file @
75412a54
...
...
@@ -14,7 +14,7 @@ namespace XAMARINCustomAction
[
DesignTimeVisible
(
false
)]
public
partial
class
MainPage
:
ContentPage
{
public
Label
text
,
counter
;
public
static
Label
text
,
counter
;
public
MainPage
()
{
...
...
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