B4J Question [ABMaterial] How to hide address bar on phones?

Mashiane

Expert
Licensed User
Longtime User
Hi

If I wanted to hide the URL address bar on phones, where can I put this script in my application...

B4X:
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

Thanks
 

alwaysbusy

Expert
Licensed User
Longtime User
A much better solution is opening the app in Chrome for Android, and then in settings use "Add to home screen". This way your app acts like a 'native' Android app without a url bar. I had a similar thing as you build in ABMaterial (full screen button in navigation bar), but the browsers always reset it when you switch between pages. The Chrome solution doesn't.
 
Upvote 0
Top