Android Question Display Help Message

John Woodsmall

Active Member
Licensed User
Longtime User
I need to display a help screen on the top of my main page.
what is the best way to do this without building an external webpage?
I have tried labels and buttons and listview and scrollviews.
 

John Woodsmall

Active Member
Licensed User
Longtime User
ok great!, is there a tutorial showing how to put this web page into the "DirAssets"?
and the syntacts as to how to open it as a url under webview?
 
Upvote 0

John Woodsmall

Active Member
Licensed User
Longtime User
No, i need to know how to place this file on the device so that it can be read by the program.
I assume that somehow the text for the html web page that I create has to be compiled into the program
that I send out? So that it can be later be read by the program.
or is there another method for getting on to the target device?
In other words how do I write to "DirAssets" as apart of the install for the program?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
it gets inserted into the package when you compile your project.

just like you add an image to your project.
 
Upvote 0

John Woodsmall

Active Member
Licensed User
Longtime User
ok...getting it.( as I read back over this thread...I seem stupid to myself)

1.) I go to designer and click on add files
2.) I select a html page from the files directory and select it as if it were an image.
3.) those images and pages(html) that I have selected get compiled with program and therefore installed on the device.
4.) ok
How do I call it from (put it into the url string) for webview? something like url="localhost\DirAssets"
(boy you must be real patient!)
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
not the designer, in the main B4A screen where you have at the bottom right Libs, Log, ... you have also a Files tab.

you can add it there.

an easier method is copying it to the files folder yourself and press the SYNC button in the Files panel.

hang on a minute, I'll try it out so that I can give you working code.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
this works if your file is named test.html

B4X:
WebView1.LoadUrl("file:///android_asset/test.html")
 
Upvote 0

udg

Expert
Licensed User
Longtime User
And, before you ask (yep, this forum is populated by knowledgeble programmers and mentalists alike eheh), you can deploy a CSS file along the HMTL one for a better user experience.
Put both in the same folder as suggested above and be sure to refer to your CSS file in the <head> section of your HMTL code, like this:
B4X:
<link rel="stylesheet" type="text/css" href="yourspecific.css" />

udg
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
@john:
I think you need to make sure the file name is all lower case (no capital letters)

@udg:
And, before you ask (yep, this forum is populated by knowledgeble programmers and mentalists alike eheh), you can deploy a CSS file along the HMTL one for a better user experience.
Put both in the same folder as suggested above and be sure to refer to your CSS file in the <head> section of your HMTL code, like this
Can you post a small css file and example as your method sounds interesting.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
not sure if it needs to be lowercase to work but the system is case sensitive.


@Mahares : something like

B4X:
body {
        background-color:white;
        font-family:Arial,Sans-Serif;
        color:black;
        font-size:12px;
}
 
Upvote 0
Top