B4A Library FlingableWebView

FlingableWebView

A modified version of the b4a WebView that supports various gestures/fling events.

For more info and some examples see this thread: http://www.b4x.com/android/forum/threads/get-left-or-right-swipe-from-panel-over-webview.32611/.

Here's the documentation:

FlingableWebView
Version:
0.02
  • FlingableWebView
    Events:
    • DoubleTap (X As Float, Y As Float) As Boolean
    • Fling (MovementX As Float, VelocityX As Float, MovementY As Float, VelocityY As Float) As Boolean
    • LongPress (X As Float, Y As Float)
    • OverrideUrl (Url As String) As Boolean
    • PageFinished (Url As String)
    • SingleTap (X As Float, Y As Float) As Boolean
    • UserAndPasswordRequired (Host As String, Realm As String) As String()
    Methods:
    • Back
    • BringToFront
    • CaptureBitmap As BitmapWrapper
    • Forward
    • Initialize (arg1 As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • LoadHtml (Html As String)
    • LoadUrl (Url As String)
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • StopLoading
    • Zoom (In As Boolean) As Boolean
    Permissions:
    • android.permission.INTERNET
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • JavaScriptEnabled As Boolean
    • Left As Int
    • Tag As Object
    • Top As Int
    • Url As String [read only]
    • Visible As Boolean
    • Width As Int
    • ZoomEnabled As Boolean

It's a drop in replacement for the default b4a WebView - with the extra events supported.

Martin.
 

Attachments

  • FlingableWebView_0_02.zip
    9 KB · Views: 1,269

cbanks

Active Member
Licensed User
Longtime User
I've looked at the code in post #5, but I'm not sure how to make it work because I have two flingablewebviews: FlingableWebView1 and FlingableWebView2.

No matter how I change the code to work with both, it either doesn't work or I get errors. Anybody know how what the code should look like for two webviews?
 
Top