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
Related
So I'm trying to migrate from using UIWebView to WKWebView for Xamarin Forms iOS but I have a few questions because this all seems to be pretty new and none of the resources are helping me online.
https://github.com/xamarin/Xamarin.Forms/pull/7367
I came across this link though, and apparently the WKWebview is not the default for Xamarin.Forms for 4.0+ and so,
1) I'm currently using Xamarin Forms 3.4.0.x. From my understanding, is all I have to do to get the WKWebView upgrading to 4.4.0.991477, the latest build?
2) Follow up to question 1, how would I not change any code because my cs files contain "using UIKit", which is the namespace for UIWebView, is it not?
3) In this link, it seems like there is no design change at all.. but I thought that WKWebView contained a URL link at the top of the page, which UIWebView does not, which is correct?
Thanks!
1) If you have only cross-platform code, then yes there is nothing that you need to worry about, it just works.
2) As you suggest that you have UIKit in your code, then obviously that won't work. UIKit is not Xamarin.Forms API and basically you don't use Xamarin.Forms in this case, but rather Xamarin.iOS.
3) Neither of those controls display URL.
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.
Hi I am working on a xamarin.forms cross platform app and I am not able to get proper UI If I check the same app on other phone there is misalignment in the buttons.Is there any code that can be used so the buttons look fine in all phones ?
Thanks
Making a responsive mobile app UI could actually be a challenge somehow. These two links however, might be helpful:
Adaptive UI with Xamarin.Forms
Tips for Building Adaptive Xamarin.Forms Apps
I have a Xamarin.Forms application that I would like to enable as a text and/or URL share target. I've done this in a Windows UWP app by handling OnShareTargetActivated, but I don't see an equivalent in Xamarin.Forms. I am willing to use compiler directives if needed; I would prefer that to doing iOS/Android/Windows specific things in the corresponding projects themselves. Right now all my code is in the Xamarin.Forms project and I'd like to keep it that way.
Unfortunately Android and Ios do not have a similar share event so there is no equivalent event in xamarin forms.
It is possible to access default photo gallery from Android and IOS and display in Xamarin.Forms
Note: I am not talk about picker. I need list of photos from gallery and show in list in Portable Library in xamarin forms.
There is no out of the box API available in the Xamarin Forms to enumerate the images from the iOS/Android. You will need to create CustomRenderer or DependencyService to list the images.
The following post may help you implement it -
iOS https://stackoverflow.com/a/32863564/85606
Android https://stackoverflow.com/a/4196411/85606
The below link is about creating your own gallery, where you can use it as per your requirement..
"http://rasmustc.com/blog/Image-Gallery-With-Xamarin-Forms/"...
Hope this helps...