0

Here is my code. Though the site is responsive, the ui is not showing correctly.The width is not showing like responsive site in a browser.

<WebView Source="http://www.classroomdj.com" x:Name="webView"    

      Navigated="webOnEndNavigated"
      Navigating="webOnNavigating"
      VerticalOptions="FillAndExpand"
      HorizontalOptions="FillAndExpand"
  />

4
  • Is the site showing at all or is it just a blank screen? Commented Aug 15, 2016 at 21:43
  • the site is showing inside webview but its not scaling down the width, size by device with. Commented Aug 16, 2016 at 6:01
  • Can you post the html or provide a link to the site. The WebView normally displays responsive html just fine, hence I think it might be an issue with your html. Commented Aug 17, 2016 at 0:31
  • Ah, ok if its ClassroomDJ, then I just tested that and can see what you mean. The WebView isn't exactly the same as the browser and has all kinds of wonderful quirks. Commented Aug 17, 2016 at 1:01

1 Answer 1

1

In ClassroomDJ.com add the viewport tag in the tags

<meta name="viewport" content="width=device-width, initial-scale=1">

To allow proper scaling on a mobile browser. The WebViews in the mobile OS are not as powerful as the regular browsers on mobile devices and are normally a limited subset that needs more information to work properly. The regular browsers always try to take care of a huge amount of edge cases to give the user the best experience possible.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I thought the viewport meta tag was there.Your answer fixed my problem.After that I have to apply some responsive css fixings to images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.