B4A Library [B4X] [XUI] AS DropDownBox - simple in app snackbar/notification/information panel

I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal. :)
B4j: jXUI
B4a: XUi,StringUtils
B4i: iXUI

Screenshot_20201007-121608.jpg
ezgif.com-crop.gif
Screenshot_20201007-121544.jpg

Swipe to hide.
20-10-08-18-30-50.gif

ASDropDownBox
Author: Alexander Stolte
Version: 1.02

  • ASDropDownBox
    • Events:
      • Click
    • Fields:
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • getBase As B4XView
      • getLabel As B4XView
      • Hide
      • Initialize (CallBack As Object, EventName As String) As String
        Initializes the object. You can add parameters to this method if needed.
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • setPadding (view_padding As Float) As String
      • setShowAlignment (alignment As String) As String
      • setShowAnimation (animation As String) As String
      • setShowAnimationDuration (duration As Int) As String
      • Show (parent As B4XView, text As String) As String
      • ShowAlignment_BOTTOM As String
      • ShowAlignment_TOP As String
      • ShowAnimation_NORMAL As String
    • Properties:
      • Base As B4XView [read only]
      • Label As B4XView [read only]
      • Padding
      • ShowAlignment
      • ShowAnimation
      • ShowAnimationDuration
Changelog
  • 1.00
    • Release
  • 1.02
    • Add isVisible
    • Add AutoHideMs
Have Fun :)
 

Attachments

  • AS DropDownBox Example.zip
    9.2 KB · Views: 455
  • ASDropDownBox.b4xlib
    2.1 KB · Views: 371
Last edited:

Pravee7094

Active Member
Hello,
Awesome Work.

When I add below line, I got error.

B4X:
ddb.Base.TextColor = Colors.Red

Error Message I Got :

Error occurred on line: 160 (ASDropDownBox)
java.lang.RuntimeException: Type does not match (class anywheresoftware.b4a.BALayout)
at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:388)
at anywheresoftware.b4a.objects.B4XViewWrapper.asLabelWrapper(B4XViewWrapper.java:213)
at anywheresoftware.b4a.objects.B4XViewWrapper.setTextColor(B4XViewWrapper.java:236)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
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 anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1714)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:226)
at android.app.ActivityThread.main(ActivityThread.java:7178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Any Suggestion ?

Thanks
 

Daica

Active Member
Licensed User
Awesome control, I have a few suggestions if it is possible with this library at all.

* Parameter to auto hide after X time.
* Stackable dropdowns
* Ability to use Panel or Layout with the dropdown to customize dropdown
* If above is not possible, maybe action buttons?
 
Top