Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Showing a PDF in your Android axml Layout?

lukasrein97lukasrein97 USMember ✭✭✭
edited November 2016 in Xamarin.Android

well we all like Xamarin.Android. But wtf is happaning today.
Okey let me explain something.

If you ever want to show a PDF in your Layout with Xamarin.Android you got fu*ked up.
You know why?
Because if you want to show it in your Layout you need to use a WebView.
So far so good. Now whats the problem here?
If you have it in your NestedScrollView, because of the fact that your whole Application is based on ExpandableToolbar + Nestedscrollview + NavigationDrawer, your Webview with your PDF wont work anymore!
Yes you think now "why shouldnt it work anymore?" Well let google explain it to us:

This is as if in desktop, you resize the browser window to height of the page so it can't scroll vertically. The scrolling is happening in NestedScrollView rather than webview itself. So a consequence of no js in the page sees any scroll events, so it doesn't know you've scrolled to the end of the page load more content. So DO NOT use WebView in NestedScrollView.

Yeah so in fact if you use WebView in NestedScrollView you cant scroll vertical.
Ok now lets search for a Component for It to show a PDF without a WebView like everybody would do it.
Oh wait, look at that prices:

Ok well so if you dont want to spend more than 300$ to show one single PDF in your Application you have to search in GitHub for some Librarys.
Well so far so good, we all stay cool now. There are many i guess. But noone want to spend so much time to intregate a Java Library in a C# Project only to show one singe PDF.

And guys if you have a solution or a workaround, please write more than only a link to the project.
There are many Pleople out there witch have this problem and dont know how to intregate a GitHub Project and work with it. So please be cool and help them!


Sign In or Register to comment.