B4J Question [SOLVED]ABMaterial - how to suppress <div id="devicetype" ...

JackKirk

Well-Known Member
Licensed User
Longtime User
In my ABMaterial project I have a quite trivial but none the less annoying little problem.

In the top LH corner of each page I have a little message "desktop" or "phone" appearing, depending on the device I am using.

Looking at the page source I find a line:

<div id="devicetype" class="hide no-print">desktop</div>

Which I can subsequently suppress with a bit of in-line javascript:

divDevicetype.style.display = 'none';

This works but the message is momentarily visible as the page is loaded - between when the div is executed and the javascript is run.

Is there a way to completely hide this?

Thanks in anticipation...
 

yiankos1

Well-Known Member
Licensed User
Longtime User
If I want to change something at source code that does not fit me,i change it and then i recompile the ABMaterial.jar library. It is now open source.

I had a problem with Calendar and i fixed it this way.

Of course if you find a bug or add a new feature, inform the creator of the lib (AlwaysBusy).
 
Last edited:
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
yiankos1, thanks for your input.

I managed to find a simple solution, I just add:

B4X:
    <script>
        const divDevicetype = document.getElementById('devicetype');
        divDevicetype.style.display = 'none';
    </script>

at the bottom of my in-line div code
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…