[Help] For Splash Screen and WebView

mik93250

Member
Hey, like it's write in title I need help for 2 things
First
For splash screen, I've try all method of the forum but no one function, maybe I do it bad, so can anyone post here a full code and all we have to do please?


Second
It's for the webView to know that it is possible to download something in the webview? because it's more speed that phoneitem --> openbrowser


Sorry for my english, I'm french :p


(B4A is REALLY perfect!! thanks)
 

kickaha

Well-Known Member
Licensed User
Longtime User
There is a splash screen tutorial HERE

Yes you can open web pages onto the webview with
B4X:
WebView1.LoadUrl("http://www.google.com")
 
Upvote 0

mik93250

Member
thanks for your response I know how webview works but for example I put a link like
"http://www.b4x.com/android/files/b4a_bridge.apk" to download the apk of B4A, webview is white and the download doesn't start :s

And for the tutorial of splash screen I have already try it but I've some error with panel initialize for example, does I must to create a new activity for this?
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Show us your code! and error!

It sounds like you're just missing an initialize, possibly you haven't generated all members yet? (done from the Designer - it's not done automatically when you add items - which is a bit of a pita, but the way it is)

:)
 
Upvote 0

eps

Expert
Licensed User
Longtime User
thanks for your response I know how webview works but for example I put a link like
"http://www.b4x.com/android/files/b4a_bridge.apk" to download the apk of B4A, webview is white and the download doesn't start :s

I don't think that's the way to use Webview... I think it's more to allow the viewing of webpages or html... I think you'd need to use the HTML lib or something (I'll try and see if I can find it....)

HTH

ETA : something like this : http://www.b4x.com/forum/basic4andr...ndroid-web-services-now-simple.html#post50919

if you search, using the search function at the top of the page for "download link" it should give you more threads about this topic

Bon journee!!
 
Upvote 0

mik93250

Member
For splash screen my code is:
B4X:
Sub Process_Globals
   
End Sub

Sub Globals
   
   Dim Timer1 As Timer
   Dim panel1 As Panel
   
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("MainLayout")
   
    Panel1.Visible=True
    Timer1.Initialize("Timer1", 3000)
    Timer1.Enabled=True
   
End Sub

Sub Timer1_tick
    Panel1.Visible=False
    Timer1.Enabled = False
End Sub

And the error is:
"an error has occured in sub: main_activity_create(javaline:212)
java.langRuntimeException:
Object should first be initialized (Panel). Continue?"

And when I add Panel1.initialized(Panel1) I've no error but no splash screen :s
 
Last edited:
Upvote 0

eps

Expert
Licensed User
Longtime User
Okay, so that might be the error... So scratch the error :)

no splash screen - what size, etc.. is this on the Designer, I'm guessing you used the Designer to create the screen? It might be that it is being displayed behind something else?

BringToFront or SendToBack (of another panel, if there is one) may well sort this out...?

HTH
 
Upvote 0
Top