Can you cast MaterialTextField as an Entry? - xamarin

I have successfully followed the instructions to implement a Password AutoFill effect on Xamarin.Forms Entry elements - this is behaving properly on both Android and iOS platforms. However, I am unable to get the effect to work when I use it on the MaterialTextField element from the XF.Material library.
I believe that the issue comes down to the native effect implementation for both iOS and Android, where I cast the xamarin form elements to native platform elements; in Android I need to use an EditText element, while in iOS I need to use a UITextField element. I haven't been able to cast the MaterialTextField to either of these elements.
Is this even possible using the XF.Material library element like this? Any suggestions would be greatly appreciated! Thank you to everyone in this community!

Related

Using Views from Native Bindings in Xamarin Forms?

First, please bear with me, I'm more of a Native dev on iOS side.
I've successfully made this "slim binding" by following this youtube video. The binding spits out UIView and Android View, which I can use on each Xamarin.iOS and Xamarin.Android app. As titled, the part that I can't figure out is how to use these bindings on XAML?
The closest thing I found is this: https://www.xamboy.com/2020/07/28/creating-a-binding-library-in-xamarin-part-2/ but that example pushes a whole view controller rather than just a simple view where I can have other things on top.
For context, the slim binding I made is for AWS IVS Player. Can't figure out any other way to have a player that has 2-3 secs of latency other than using their own player.

Here maps with Xamarin Forms

I plan to use here api to reduce my costs compared to google maps.
Is there a way to use the here map in Xamarin forms?
I have already designed the search combo suggestion to find places. Now I would like to show the places on the here map.
Thanks,
You can use android studio. The Xamarin bindings still need to be created in the SDK, as the are not on our roadmap yet.
But you can either create the bindings yourself.

Xamarin forms android webview video fullscreen

I have a webview that contains a video in my Xamarin forms application. Android does not allow for full screen but iOS does I know I could implement the WebChromeClient but I have only seen this done for Xamarin Android and not for forms. I can't seem to get it to work. Any ideas?
If you need to access the underlying native controls and their properties, methods and events, you do that with custom renderers.
I'm glad I found this because I don't think I could of done it on my own.
https://github.com/mhaggag/XFAndroidFullScreenWebView/tree/master/XFAndroidFullScreen/XFAndroidFullScreen

Sticky Header in xamarin forms listview

Xamarin.forms provides the ListView control. I followed the implementation of #jamesmotemagno for grouped list view. The application works fine. But the only problem is with sticky group header which comes default in ios and windows but not in android. This is very irritating just because of android I need to implement the custom rendering which led to render on ios and windows, which is not required. Is there any way to solve this problem of sticky header in android without disturbing ios and windows. Please suggest any solution for android.

Configure platform page with platform specific options

We've begun evaluating Xamarin for a up and coming project involving both iOS and Android, with the overriding intention to produce a single UI layer (and some share code, obviously) (I'm also new to C#)
TL;DR
I've begun exploring Xamarin on iOS. I started with the Phoneword example and it worked well enough.
The first issue I found was running the code on the iPhone X, which I was able to solve by using MainPage.On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); in the platform App class
While testing this, I noticed some issues with the ListView not scrolling properly (the core issue was actually with the platform padding).
I then used (MainPage as Xamarin.Forms.NavigationPage).On<iOS>().EnableTranslucentNavigationBar(); to enable translucent navigation bars (as we're targeting iOS 11+) and now everything appears under the navigation bar.
This is easily fixed in xCode and after some research I've found that I need to be using UIKit.UIViewController.EdgesForExtendedLayout Property, the immediate problem I'm facing is, the only "snippets" of code I can find are from the View is displayed under status bar in iOS 7 and EdgesForExtendedLayout doesn't help forum post.
Issue at hand...
The example solution snippets posted seem to be making use of a platform (iOS) specific solution. The problem is, I want to keep using the "cross-platform" code in the "platform" project and simply provide some custom configuration for the iOS platform which can apply these states.
I understand it could be possible to use a renderer, but this seems to counter-interactive, as I'd need one for both iOS and Android, where the platform page is doing just fine as it.
I understand that I could setup a DependencyService, but this seems annoying to have to include a specific "configuration" service just to solve this issue for iOS
I was hoping it might be possible to setup a iOS Page which would "override" some of the functionality of the platform page and would allow me to make use of things like viewDidLoad so I can apply the iOS specific configurations on a page by pages bases, so we could keep the platform page as it, but when running under iOS, it would provide me access to iOS life cycle of the actual view...
I've been trying to search the documentation and tutorials and haven't yet come across anything which would seem to do this or something similar (not to say there isn't one, but I'm just not finding it).

Resources