Navigation

    Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    Resize windy to fit Android WebView height

    Windy API v4
    4
    5
    887
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      efoertsch last edited by

      Hello

      (I am an Android programmer, not html/javascript programmer, so my apologies if the answer is really straightforward.)

      Currently I am using the Windy Hello World example to set the height of Windy in Android WebView.

      #windy {
      width: 100%;
      height: 400px;
      }

      I arbitrarily chose 400px above for the height to get started.

      But Android devices (and desktops and laptops) have different device heights, and also the area allocated for displaying the Windy map in the Webview may vary in height on the screen. Is there a way to dynamically set the height parm either at initialization or at some later point so that Windy properly fills the allocated screen area?

      I have tried a number of 'solutions', mainly from StackOverflow related to leaflet but with no luck.

      Any ideas?

      Thanks

      Eric

      1 Reply Last reply Reply Quote 1
      • H
        hashmih last edited by

        i think if you put
        height:100%
        it will fit itself into all allocated area

        1 Reply Last reply Reply Quote 0
        • D
          droidgox Developers last edited by

          this is correct. however, it needs to be full screen. if you have some other android views in the ui and the windy webview gets resized in height, the animation stops and the layers become gray.

          the height: 100% will work well if it is ensured that only a webview is in the user screen.

          Korina 1 Reply Last reply Reply Quote 0
          • Korina
            Korina Administrator @droidgox last edited by

            @droidgox Hello, using Windy.com in a WebView is restricted. Please let us know the purpose of your project.

            D 1 Reply Last reply Reply Quote 0
            • D
              droidgox Developers @Korina last edited by

              @Korina hi . yes i am aware it is restricted. i am only sharing my experience when i tried to test it in a webview.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
              NodeBB & contributors, OSM & contributors, HERE maps
              Terms and Conditions     Privacy Policy