I created a completely new project and copied the following code into the project (from
Post #5 )
Sub Process_Globals
End Sub
Sub Globals
Dim FlingableWebView1 As FlingableWebView
Dim DefaultWebViewClient1 As DefaultWebViewClient
End Sub
Sub Activity_Create(FirstTime As Boolean)
FlingableWebView1.Initialize2("FlingableWebView1","MyIf")
DefaultWebViewClient1.Initialize("DefaultWV")
Activity.AddView(FlingableWebView1, 32dip, 32dip, 100%x-64dip, 100%y-64dip)
FlingableWebView1.SetWebViewClient(DefaultWebViewClient1)
FlingableWebView1.LoadUrl("http://www.b4x.com/android/forum/threads/get-left-or-right-swipe-from-panel-over-webview.32611/")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub FlingableWebView1_DoubleTap(X As Float, Y As Float) As Boolean
Log("FlingableWebView1_DoubleTap "&X&", "&Y)
' this Sub must return a Boolean value
' return False to indicate that you have not handled the event
' the WebView will take it's default action
' return True to indicate that you have handled the event
' the WebView will take no action
Return False
End Sub
Sub FlingableWebView1_Fling(MovementX As Float, VelocityX As Float, MovementY As Float, VelocityY As Float) As Boolean
Log("FlingableWebView1_Fling "&MovementX&" "&VelocityX&" | "&MovementY&" "&VelocityY)
' this Sub must return a Boolean value
' return False to indicate that you have not handled the event
' the WebView will take it's default action
' return True to indicate that you have handled the event
' the WebView will take no action
Return False
End Sub
Sub FlingableWebView1_LongPress(X As Float, Y As Float)
Log("FlingableWebView1_LongPress "&X&", "&Y)
' note this event has no return value
End Sub
Sub FlingableWebView1_PageFinished (FlingableWebView As FlingableWebView, Url As String)
Log("FlingableWebView1_PageFinished Url="&Url)
End Sub
Sub FlingableWebView1_SingleTap(X As Float, Y As Float) As Boolean
Log("FlingableWebView1_SingleTap "&X&", "&Y)
' this Sub must return a Boolean value
' return False to indicate that you have not handled the event
' the WebView will take it's default action
' return True to indicate that you have handled the event
' the WebView will take no action
Return False
End Sub
Sub DefaultWV_ReceivedError (FlingableWebView As FlingableWebView, ErrorCode As Int, Description As String, FailingUrl As String)
Log("error" & Description)
End Sub
Sub DefaultWV_ReceivedSslError (FlingableWebView As FlingableWebView, SslErrorHandler1 As SslErrorHandler, SslError1 As SslError)
Log("error" )
End Sub
and I get this error
B4A Version: 9.80
Java Version: 11
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.75s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (5.16s)
Compiling debugger engine code. (1.70s)
Compiling generated Java code. Error
B4A line: 11
FlingableWebView1.Initialize2(\
src\b4a\example\main.java:384: error: cannot find symbol
mostCurrent._flingablewebview1.Initialize2(mostCurrent.activityBA,"FlingableWebView1","MyIf");
^
symbol: method Initialize2(BA,String,String)
location: variable _flingablewebview1 of type FlingableWebView
I then installed Oracle JDK 8 and configured the path in B4A and I get the same error below.
I then removed references to AJWebkit, and the program compiles, but of course will fail Google's SSL error handling test. Does anyone know how to overcome this or is FlingableWebView no longer a valid library for B4A?
B4A Version: 9.80
Java Version: 8
Parsing code. (0.00s)
Building folders structure. (0.02s)
Compiling code. (0.07s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling debugger engine code. (0.72s)
Compiling generated Java code. Error
B4A line: 11
FlingableWebView1.Initialize2(\
javac 1.8.0_251
src\b4a\example\main.java:384: error: cannot find symbol
mostCurrent._flingablewebview1.Initialize2(mostCurrent.activityBA,"FlingableWebView1","MyIf");
^
symbol: method Initialize2(BA,String,String)
location: variable _flingablewebview1 of type FlingableWebView