I have inside ScrollView images and i want selected image opened in some new page and have pinch and zoom , i try webview control but i cant load image from my solution path .
Can i load image from path where is inside my app in WebView ? Another method for pinch and zoom ?
Thanks.
G.MichG.Mich
50822 gold badges99 silver badges2828 bronze badges
1 Answer
You can in fact load content that is bundled into you app with the Xamarin.Forms WebView. See this link: https://developer.xamarin.com/guides/cross-platform/xamarin-forms/user-interface/webview/
I hope that helps!
jsbeckrjsbeckr
91811 gold badge77 silver badges2424 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged webviewxamarinxamarin.iosxamarin.androidxamarin.forms or ask your own question.
I intend to load local HTML files into a Xamarin Forms WebView.
With the TomTom Navigation app, driving somewhere new couldn’t be easier. How to install tomtom maps cracked download. Now on your smartphone.Last minute plans? You’ve always got your smartphone with you, so navigation’s close at hand.
I've added the HTML files to the
assets/HTML folder, and its Build Action is set to AndroidAsset.
I've implemented the base URL finder interface:
I have tried to load the file from the using this in the shared portable code:
I also tried a custom WebViewRenderer, and used this code:
With both solutions I get an error:
What else should I try?
Michael Irigoyen
17.6k1515 gold badges7676 silver badges115115 bronze badges
NestorNestor
4,41455 gold badges4848 silver badges9696 bronze badges
4 Answers
Your source should be of type HtmlWebViewSource and not string.
Artur Shamsutdinov
2,32411 gold badge1212 silver badges2929 bronze badges
This is my MainActivity.cs;
You must put your html file in to Assets folder and sets html build action AndroidAsset. With this way I can load html file into WebView.
alpersilistrealpersilistre
I'm not sure why you had trouble.I followed your steps and things just worked: Star wars yoda vs palpatine reddit.
The snippet looks like this:
NOTE:
'Content.html' is the name of my local webpage that I added to the 'Assets' folder of my local Droid project.
XAML
ViewModel:
Interface:
Android Contract:
Scott NimrodScott Nimrod
5,83933 gold badges3838 silver badges6666 bronze badges
Here is related post and official sample
See if this can help.
Xamarin Forms Webview Navigation
and
Load External Js Webview Xamarin Forms 10
Community♦
Load External Js Webview Xamarin Forms 2017
MaxJMaxJ
Not the answer you're looking for? Browse other questions tagged xamarinxamarin.androidxamarin.forms or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |