Xamarin - support inserting GIF and images using Android keyboard - image

Has anyone gotten the android keyboard to support GIF and image insertion in an Xamarin app? Let's say I want to build a chat application, have a custom EditText view to capture user input, and want to have it behave similar to the Android built-in chat application. Currently the keyboard shows a popup . Is it possible to make this work? I prefer to not create a custom keyboard renderer, though was hoping this could be done within a custom EditText renderer. Along the lines of:
UPDATE: For anyone looking for a similar solution, I have been making progress using the https://github.com/xamarin/monodroid-samples/tree/main/android-n/CommitContentSample. Essentially set the content mime types and wrap the IOnCommitContentListener, then process OnCommitContent().

Related

Using Android Voice Access to interact with Xamarin elements which don't show text

I have Xamarin buttons and CollectionView items which don't show text strings, and I'm working to support Android Voice Access being able to interact with those elements. Voice Access works fine with controls that do show text strings, but I've not found a way to interact with the controls that don't show text. I've set appropriate AutomationProperties.Name properties on the controls, but Voice Access doesn't interact with the controls when I speak those AutomationProperties.Name properties.
What can I set on the controls to have Voice Access work with controls, when the controls don't show text?
A snippet of code might help generate more answers but without seeing the code, you might need android:importantForAccessibility="yes" or android:focusable="true" and possibly android:clickable="true"
See also What is the difference between Android focusable and importantForAccessibility when using TalkBack?

Xamarin forms iOS default mail app Behavior

As per the requirement of the project I need to have the page which should behave as the default Apple Mail app on the iPhone.
Attaching a gif that I have created for the same.
I tried using the plug in https://github.com/rotorgames/Rg.Plugins.Popup
but I couldn't achieve the exact same behavior where the background shrinks and expands as the modal pop up is dragged.Any leads, examples or demos will be really helpful.
Note: I am using Xamarin.Forms.
With the new Xamain Forms update. i.e. after iOS13
The model behavior has became the default model behavior for Xamarin iOS.
When you do.
Navigation.PushModalAsyn(<your_page_here>).
It gives the above (gif) behavior.

Xamarin Forms - Disable loading spinner on ListView

I have a Xamarin forms app where I'm using ListViews to display some data, with pull to refresh enabled. When the ListView is pulled and starts the refresh it has its own spinner animation. However, this doesn't display when the page first loads, and so I've wired in a separate ActivityIndicator to indicate loading for just the first time. It's styled different though. I would prefer to use the ActivityIndicator, since it's what's used through the rest of the app, but I haven't found a way to disable the spinner animation on the ListView yet. Is it possible to disable it? Any suggestions would be appreciated, thanks!
There are a few ways I can think of to solve this.
Don't use Pull-to-refresh. Xamarin.Forms has this built in and you can't customize it without using renderers and altering controls. Instead, start your refresh another way (ToolbarItem, etc) and continue using your custom ActivityIndicator.
Customize the existing ListViews UIRefreshControl. You may be able to use a renderer or "Effect" to customize the RefreshControl being used by the native control. This would allow you to style it a little close to what your custom indicator looks like.
Change the color of the spinner. This is my least favorite option. You could workaround this by changing the color of the spinner to match the background so you don't see it.

Which control is used to hold image,text and audio files like a flow document in windows phone applications

I am developing an application similar to one-note in windows phone. I wonder what control they use for storing image,text and audio files.
I tried with RichTextBox but I found that RichTextbox is readonly for windows phone
Please suggest an approch to achieve this functionality
Thanks in advance.
For those who are not aware of One-note app in windows it holds text,images and audio
files like a Flow document.
Your best bet would be to use a <Canvas>
MSDN Canvas
It can hold any other XAML object and they can quickly and easily be positioned on the canvas in both XAML and back end code
That said, you are going to have to do some custom coding to create the UI elements dynamically.
This shouldn't be to hard.
If it were me I would create an application bar and in the sub menu I would create all of the UI elements you're allowing the person to create. When they select a UIElement it adds it to the canvas and you allow it to be draggable and editable.

Windows Mobile Custom Textbox

I'm trying to replicate the input box shown in the image on windows mobile 5+
but i'm struggling for ideas!
So far the only things I have come up with (I haven't managed to make either work) were to either;
inherit TextBox and paint the textbox
background manually by overriding
OnPaint/OnPaintBackground
make the textbox background
transparent and position the
textbox over an image that looked
like the one in the screen shot
Has anybody done this or know of how this could be acheived?
Thanks in advance
OneShot
I gave up on this as I have moved away from windows mobile but found that it wasn't possible, due to restrictions in the compact framework, to do this with the existing textbox, you would need to create your own texbox control from scratch!

Resources