B4A Library SD: Floating Button StandOut

peacemaker

Expert
Licensed User
Longtime User
How to change the icon size at runtime ? I have always the same size, cannot understand where it is inited, and how to update.
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
How do you detect when the floating button is clicked, versus the app opening regularly?
 

Star-Dust

Expert
Licensed User
Longtime User
see the SetEvent method
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
ty. Is it possible to access the floating button's canvas so I could draw onto it?
 

Star-Dust

Expert
Licensed User
Longtime User
if you want to pass a canvas as an image of the floating icon after ver drawn on the canvas use the Cavas.Bitmap method. will return a bitmap that you can use as the image
 

incendio

Well-Known Member
Licensed User
Longtime User
Hi,
Thanks for this library.

I tried it with Andro 10 & B4A 10.5, it worked great, but notification info with empty message always shows when call FloatingStandOut.Start.

On Android 7, there was no notification info.

Can it set to set notification info always off?
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
unfortunately not. With the latest versions of Android when you boot into special service to keep it alive you have to tie it to a notification
 

gainax00

Member
Hola!!
Hello!!
Cómo poner un GIF animado o APNG en lugar de una imagen estatica
How to put an animated GIF or APNG instead of an statist image
 

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
in the example the click opens the activity

I mean the first example friend
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("main")
    FloatingStandOut.SetEvent("FL")
    FloatingStandOut.PathImage=File.DirAssets
    FloatingStandOut.NameFileImage="iniciologin.png"
    FloatingStandOut.X=50%x
    FloatingStandOut.Y=50%y
    FloatingStandOut.SetStartActivity(True,True,False)
'    FloatingStandOut.SetStopFloating(False,False,True)
End Sub

Sub Activity_Resume
'    FloatingStandOut.Stop
End Sub

Sub FL_OnClick(X As Int, Y As Int)
    Log("FL_OnClick")'<-----------------Here---------'
    StartActivity(Me)
End Sub

Sub Activity_Pause (UserClosed As Boolean)
'    FloatingStandOut.Start(Me)
End Sub

Sub Button1_Click
    Dim Permission As SpecialPermission
    Permission.Initialize
    If Permission.GetPermission Then
        FloatingStandOut.Start(Me)
    Else
        Permission.OpenSettingPermission
    End If
    
    Activity.Finish
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
B4X:
Sub FL_OnClick(X As Int, Y As Int)
    StartActivity(Me)
    ' or StartActivity(MainActivity)
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Help me!!
How to put an animated GIF
see this
 

Star-Dust

Expert
Licensed User
Longtime User

Star-Dust

Expert
Licensed User
Longtime User
I'm not sure I understand the question
 

Star-Dust

Expert
Licensed User
Longtime User
Sure
B4X:
standout.Snotif.SetInfo("Hallo","Float",Me) ' Me is Main Activity
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…