B4A Library ProBundle

zhousongke

Member
Licensed User
Longtime User
Look at OverlayWindow.

I modified the code of the OverlayWindow class to raise events such as onTouch, onPointerDown, onPointerUp, onDown, onSingleTapUp, onSingleTapConfirmed, onDoubleTap, onShowPress, onLongPress, onDrag, onScroll, onFling, onPinchOpen, onPinchClose, onRotation
, etc. The ScreenX/Y parameter is added to the onTouch and onDrag events. The library, source code, and samples in the attachment.
 

Attachments

  • OverlayWindowGesture and SourceCode.zip
    33 KB · Views: 307

mr.gedo

Member

hello,
how to pin the widget to right or left automatically when i moving it like facebook messenger ?

like this

 

mr.gedo

Member
You must first detect the user's intention (his gesture to the right or to the left) and then correctly position the button on the right side.

Hello informatix, thank you for reply

I don't understand how exactly to do this ?
How i can detect the user gesture and make effect like magnetic ?
 

aidymp

Well-Known Member
Licensed User
Longtime User
@Informatix Hi, someone asked about the coverflow lib, i directed him here but its been removed!

Any reason why?

Thanks

PS it still a great library!! and i would pay for updates!
 

SMOOTSARA

Active Member
Licensed User
Longtime User
hi Informatix
i have this error in ArchiverPlusZip


B4X:
relayoutVisibleWindow: Window{e9b7eee u0 b4a.example/b4a.example.main EXITING} mAnimatingExit=true, mRemoveOnExit=false, mDestroying=false
duplicate layer name: changing b4a.example/b4a.example.main to b4a.example/b4a.example.main#1
tid 8455: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
Failed to set EGL_SWAP_BEHAVIOR on surface 0xe9f856c0, error=EGL_BAD_MATCH
Attempting to set client state on removed layer: b4a.example/b4a.example.main#1
Attempting to destroy on removed layer: b4a.example/b4a.example.main#1
duplicate layer name: changing Dim Layer for - Task=3935 to Dim Layer for - Task=3935#1
Attempting to set client state on removed layer: Dim Layer for - Task=3935#0
Attempting to destroy on removed layer: Dim Layer for - Task=3935#0
Launch timeout has expired, giving up wake lock!
Class anywheresoftware.b4a.B4AThreadPool failed lock verification and will run slower.
Class a.a.a.d.f failed lock verification and will run slower.
Unexpected event (missing RaiseSynchronousEvents): archiver_zipprogression
Check the unfiltered logs for the full stack trace.
java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Thread.java:1348)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:314)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:77)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:248)
    at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:217)
    at anywheresoftware.b4a.keywords.Common.DoEvents(Common.java:412)
    at b4a.flm.archiverplus.ArchiverPlusZip.a(SourceFile:208)
    at b4a.flm.archiverplus.ArchiverPlusZip.UnZip(SourceFile:321)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at b4a.example.main.afterFirstLayout(main.java:111)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6680)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Attempting to set client state on removed layer: Dim Layer for - Task=3935#1
hw_composer sent 72 syncs in 92s
Remote logger timeout: 1
Starting remote logger. Port: 35352
UnZip test.zip * OK
Skipped 159 frames!  The application may be doing too much work on its main thread.
Davey! duration=2662ms; Flags=0, IntendedVsync=7973650490383, Vsync=7976300490277, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7976304207052, AnimationStart=7976304297566, PerformTraversalsStart=7976305153820, DrawStart=7976305373401, SyncQueued=7976305478722, SyncStart=7976305599687, IssueDrawCommandsStart=7976305658353, SwapBuffers=7976305958950, FrameCompleted=7976312656170, DequeueBufferDuration=151000, QueueBufferDuration=254000,
Skipped 122 frames!  The application may be doing too much work on its main thread.
Davey! duration=2059ms; Flags=0, IntendedVsync=7976317159305, Vsync=7978350492557, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7978365216481, AnimationStart=7978365235199, PerformTraversalsStart=7978365241624, DrawStart=7978365426005, SyncQueued=7978365496126, SyncStart=7978365519872, IssueDrawCommandsStart=7978365566246, SwapBuffers=7978366249573, FrameCompleted=7978376801194, DequeueBufferDuration=163000, QueueBufferDuration=1060000,
Skipped 41 frames!  The application may be doing too much work on its main thread.
Davey! duration=700ms; Flags=0, IntendedVsync=7978380720229, Vsync=7979064053535, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=7979074588203, AnimationStart=7979074607200, PerformTraversalsStart=7979074613905, DrawStart=7979074657765, SyncQueued=7979074734870, SyncStart=7979074976241, IssueDrawCommandsStart=7979075029041, SwapBuffers=7979075268178, FrameCompleted=7979081123112, DequeueBufferDuration=99000, QueueBufferDuration=434000,
hw_composer sent 30 syncs in 60s
Scan result ready event
Remote logger timeout: 2
Starting remote logger. Port: 35352
hw_composer sent 6 syncs in 60s


 

Informatix

Expert
Licensed User
Longtime User
In debug mode ? You shouldn't use it with async tasks.
 

JagiChan

Member
The download link in post #1 is not working. The error states "The page isn’t redirecting properly An error occurred during a connection to doc-08-94-docs.googleusercontent.com."
 

Midimaster

Active Member
Licensed User
hi, im using your ArchiverPlusZip very successfull on Android. Now I want to use it on B4J and I got this error:

B4J 8.5 on windows 10, compiled as "Release"

the last black line was from my event sub:
B4X:
Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The unzip file was created, but not full finished.

Looks like a bug, or?
 

Midimaster

Active Member
Licensed User
yes, but i'm searching for a common solution for both platforms , and perhaps the author want to keep it running on both platforms. It looks like he used the keyword "DoEvents". will see, what he answers...
 

Informatix

Expert
Licensed User
Longtime User
Could you post your project ? ArchiverPlusZip works with B4J and an example for B4J is provided with the library.
 

Midimaster

Active Member
Licensed User
good to hear, that ArchiverPlusZip will work on B4J.
first of all we should find out, whether I use the current version. I'm not sure, that I use the current version, because when I visit your homepage (with Firefox) , I cant start any download. So I received the library from anywhere. My download had the filename "Archiver v1.11.zip" and a size of 27.029bytes. Inside the zip there is a folder "library". 7zip says it's size will be 51.589bytes. Inside is are only two files: a Archiver.jar from 2013-06-13 and a Archiver.xml from 2013-06-13

My code is nothing special:
B4X:
Sub Process_Globals
    Public Zip As ArchiverPlusZip
    Public DataFolder, UserFolder, SourceFolder As String
    Public ZipPasswort As String="123456" ' fake passwort for forum!!
...

Sub AppStart (Form1 As Form, Args() As String)
    DataFolder=File.DirData("20Tracks")
...

Sub DeZip(FileName As String, TargetName As String ) As String
    Zip.DecryptZipWithString(ZipPasswort)
    Dim ZipFileName As String = File.Combine( DataFolder, FileName)
    Dim lstEntries As List = Zip.ListZipEntries(ZipFileName)
    Dim ZipInfo As ArchiverZipInfo = lstEntries.Get(0)
    Dim SourceFileName=ZipInfo.FileName
    Zip.UnZipFile2(ZipFileName,SourceFileName,DataFolder,TargetName,"")
    File.Delete(DataFolder,FileName)
...

Sub ZipEvent_ZipResult(Result As Int,Error As String )
    Log("ready" & Result & " " & Error)
End Sub


Sub ZipEvent_ZipProgression(Operation As Int,Filename As String, Percent As Float )
    If Percent>5 Then
        Log("working " & Operation & " " & Percent)
    End If
End Sub

The ZIP-file is made in a B4A-app with ArchiverPlusZip on an Android device. It contains only one file of 10MB (packed) crypted with AES-128. For security reasons I cannot send you the original ZIP, but I will try to build a fake copy of the file if necessary.

But perhaps you can first check, whether I work with the correct version?
 

Informatix

Expert
Licensed User
Longtime User
Please udpate your version to 1.13. It can be downloaded from the first post of this thread. Change for another browser if Firefox does not work.
 

incendio

Well-Known Member
Licensed User
Longtime User
Please udpate your version to 1.13. It can be downloaded from the first post of this thread. Change for another browser if Firefox does not work.
I am using Firefox to download the library, no problem here.

It's good that you still active in this forum.

Your libraries, in my opinion are the highest quality that works flawlessly for me.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…