Xamarin.Forms Accessibilty VoiceReader - xamarin

Quick question.
When it comes to Xamarin Forms, I noticed that if there is an alert called from the ViewModel
e.g:
DisplayAlertAsync("Title","Message", "Ok");
That the voice assistant only auto reads the first parameter of DisplayAlertAsync ("title") and does not auto-advance to the following parameters.
So, a temporary solution I did was concatenate the 1st and 2nd parameters into the 2nd parameter, so that VoiceReader auto reads both the title and message for accessibility users.
e.g:
DisplayAlertAsync("" ,"Title"+ "\n"+ Message", "Ok");
Is there a way to keep the traditional DisplayAlertAsync("Title","Message", "Ok"); parameter assignment, and have VoiceReader auto advance to the following parameters?

What you are looking at is expected behavior. Since Xamarin Forms uses Native APIs, so the alert dialog in the native platforms also does the same thing- Whenever you open a new page/alert, it should read the Title of that view.
For the most part, what you want to keep an eye out for is images & icons, you have to override the description of those items.
Q. Is there a way to keep the traditional DisplayAlertAsync("Title","Message", "Ok"); parameter assignment, and have VoiceOver/TalkBack auto advance to the following parameters?
A. No there isn't, you would have to create your own custom renderer if you want the reader to read everything.

Related

what is the best way to switch from or exit from formFlow to Dialog in Bot Framework

Here is my Basic Code
The formFlow works fine and after checking the if condition ,it should go to the else part ,which it does, but in the else part the wrote this line of code
await Conversation.SendAsync(activity, () => new AskMeAnything());
AskMeAnything is a class implementing Idialog. The problem is ,its again going/calling the formflow rather than jumping into the above mentioned dialog.
I read about IdialogStack but unable to understand how to remove the dialog on top of stack or something related to it.
i need help in moving to other dialog without looping into formflow.
Thanks
The first time you call Conversation.SendAsync(...) you actually create a root dialog for your conversation. Every consecutive call to the bot will still enter the controller but will be routed to the dialog at the top of the stack.
So when you call Conversation.SendAsync(...) for a second time you are actually trying to change the root dialog in the stack. I don't think this is possible and that's why your form is called again.
To solve this problem I would create a different dialog and make that dialog your root dialog. From this root dialog you can call your form and any other dialog.

xamarin forms webview.eval return type is voide . How to retrieve user input data?

I am working on xamarin.forms. I have a content page which contains one webview which load 3rd party url(www.xyz.com) site and one button in shell.
On button click event I am trying to get user input data using
webview.eval(javascript: var data = document.getElementById('first-name').value;alert(data)).
It works fine but due to void return type I could not store data in local variable and I have a customrender(webviewrender) but don't know on shell button click event how can I get userinput data from webview
Please suggest me how do I achieve this functionality.I do not want XLab-Hybridwebview.
You'll probably need to have the JavaScript code call out to the external code when the result is available. You could then wrap that whole process in a TaskCompletionSource to make everything nice and easy to use.

Robotium : Getting number of items in spinner?

I'm a QA, and I'm new to android automation as such, and I am having problem in automating the spinner / Dropdown related activities in my app. I am using Robotium 4.1 for my automation.
The Spinner in my app is implemented using actionbarsherlock. The Hierarchyviewer shows it as Popupwindow:SOME-RANDOM-ID. It looks like the implementation is internal to actionbarsherlock. After talking to the dev he tells me that it's a "non-visible" element. I don't understand what that means, because I can see the element.
Also, I can't find the methods mentioned in some of the other questions here.
I suppose the right way is to use solo.getViews(), and solo.getCurrentViews etc. but I don't know how to use the parameters in there, so whatever I tried didn't work.
Can someone guide me with a detailed example? (including how to give the parameters to getViews etc will be much appreciated.)
How to get number of items:
mSpinner.getAdapter().getCount();
How to click on specified item on spinner:
solo.pressSpinnerItem(indexOfSpinner, indexOfItem);
How to get current spinners:
ArrayList<Spinner> currentSpinners = solo.getCurrentViews(Spinner.class);
How to get spinner with specified index:
Spinner spinner = getView(Spinner.class, index);

multiple textboxes in input prompt WP7

coding4fun toolkit's input prompt has one textbox but I can't find any way to add another!
Here is the sample I found from google:
InputPrompt input = new InputPrompt();
input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
input.Title = "Test Title";
input.Message = "Test message !";
input.InputScope = new InputScope { Names = { new InputScopeName() { NameValue = InputScopeNameValue.EmailSmtpAddress } } };
input.Show();
Here i can add only single inputscope...but i need to add multiple text boxes here!
can anyone help me ?
Thanks in advance !
The Coding4Fun control does not support this. You'll need to create your own control for such an interface. (hint. You could extend the code of the C4F control.)
My understanding and expectation of the C4F control is that it was intended for quickly gathering an single piece of information which wouldn't warrant the need for its own page.
If you're looking to require the user to enter data into "multiple text boxes" you'll likely be able to create a better user experience (and one that is like the native apps on the phone) if you use a separate page to gather such information.

How to listen to keyboard events in GWT table?

In my GWT program I have a table that has a selected row. I'd like to move the row selection with the up- and down-keys on the keyboard. So I have to catch the key events somehow.
The GWT docs handle key events in input fields only. But I don't have an input field!
Is this possible at all? Maybe it is a DOM/Javascript restriction that GWT cannot work around...
It works by using Event.addNativePreviewHandler(NativePreviewHandler handler)
But there are some things to consider:
The handler is not restricted to a widget. It is global for your application. If you change widgets you might have to register and unregister the handler manually.
There are browser differences with keyboard events. Some browsers send keyDown- and keyPress-Events, others just keyDown-Events.
To work around the second issue you can get the name of the browser using this code:
private static native String getUserAgent() /*-{
return navigator.userAgent.toLowerCase();
}-*/;

Resources