Webviewer on full screen doesnt work

Hi everyone, I hope you’re doing well.

I’m having an issue with my WebView app. The app does not open in fullscreen at all. During live testing, the website loads, but it is not fullscreen. When I download and install the test build, the app only shows a white screen and nothing loads. The website itself works fine in the browser, and I’m using only one WebView for the entire app. What settings am I missing to make the WebView load properly and always open in fullscreen on all devices?

I am new in Thunkable, so you would help me a lot. Thank you!!

Hi @tristudios,

I actually ran into this exact issue recently and ended up building a reliable fix for it.

Is your WebViewer placed inside a layout and then inside a container, or is it added directly to the screen without any parent container?

Hi @grant.mccallum

It is added directly to the screen without any parent container, should i add one or what should i do?

Yes, that’s the core of the problem.

A WebViewer placed directly on the screen cannot size itself correctly. It has no proper boundaries, which is why you see the dead space. (You can see this for yourself by using the Webviewer Computed Height blocks - it will return ‘0’ every time.)

The fix is to nest it properly and then let a container control its visible size.

Here is the setup that works reliably:

  1. Put a Layout at x = 0, y = 0

  2. Put a Container inside that Layout

  3. Put the WebViewer inside the Container

Next, you need to make sure the layout itself is the exact height of the device. I recently posted a working solution for that here:
https://community.thunkable.com/t/solved-how-to-make-android-layouts-fit-correctly-on-every-device/4108120

Once the layout has calibrated and is the correct height:

  1. Set the WebViewer height and width larger than its parent container
    For example:
  • WebViewer height = Layout height × 1.3

  • WebViewer width = Layout width × 1.2

This sounds entirely stupid (and it is) but it works because the container acts as guard rails and clips it to the exact screen size.

So instead of trying to make the WebViewer fit, you oversize it and let the container adjust the size..

If everything is nested correctly, the WebViewer will now fill the screen perfectly on all devices.

Thank you very much for the small tutorial you gave me.

I tried it out, and when I opened it for the first time, it probably calculated something incorrectly. It looked like this:

When I opened it again, it was just a normal white screen, so it didn’t calculate or show anything anymore.

This is my Block system:

This is how project tree looks:

Did I do something wrong, or is something missing? Thank you very much for your help.

Hi tristudios,

You’re almost there, you’re just missing the final step.

Add these blocks:

Underneath “Set Layout1’s Height to "[Stored variable CorrectLayoutHeight” block in Screen1 Opens.

and

Underneath the “Set variable [CorrectLayoutHeight’ to [app variable CurrentLayoutHeight’] block in your AdjustScreen Function.

Hi,
I tried it again with the additional blocks and now when i open it for the first time, it opens the webviewer only like this:

The good thing is that the app now always opens the WebView inside the app. The last time, it only loaded the first time. After closing and reopening the app, it would just show a white, blank page. That no longer happens.

Now the WebView always loads, which is the positive part. However, the WebView is still not fully correct. It is not displayed in full screen. I think the height is calculated too large, while the width is too small. So it is too tall and too narrow, which is the current problem.

I hope you still have a solution for this. Thank you very much for your help.

From what I can see, the height is actually correct now. The WebViewer is filling the full vertical space of the screen. The remaining issue looks to be width (and your layout/container settings), not height.

The issue where the WebView only loaded the first time and then showed a white screen after reopening was not something you did wrong. That was caused by a recent Thunkable update. There’s an active bug report about it here, which matches what you were seeing:

If you’d like, DM me a link to the project and I can take a look at your setup.

Yes i will dm you my project but the height is an issue because it should look like this (with the tab bar in the bottom):

How can i dm my project to you directly?

Open your project, in the design view, look for the share icon in the top right, click it and it will generate a link to a copy of your project.

Click on my name in this forum, and click the message icon. Then paste the link to a copy of your project into that chat window.

I have the link but there is no message icon so do you have an email adresse or should i put it in here?

Email is fine: tenukisoftware@gmail.com

I have sended you the Project

hi @grant.mccallum,

did you had time to look at the project and did you found a solution?

Hi @tristudios,

Yes - I emailed you back on Thursday. Let me know if you received it.

Nope - unfortunaly i didnt recieve your mail can you send it to “TriStudios@gmx.de”

Thanks

Hi @tristudios

No problem - I’ve forwarded on the email.