B4A Library WaveSideBar

A wrapper for this https://github.com/gjiazhe/WaveSideBar

gif.gif


WaveSideBar
Author:
SMM
Version: 0.01
  • WaveSideBar
    Events:
    • _selectindexitem (index as string As )
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • IndexItems() As String [write only]
    • LazyRespond As Boolean [write only]
      If true, the listener will not be called until the finger up. If false, the listener will be called when the finger down, move and up.
    • Left As Int
    • MaxOffset As Int [write only]
    • Parent As Object [read only]
    • Position As Int [write only]
      0 for POSITION_RIGHT and 1 for POSITION_LEFT
    • Tag As Object
    • TextColor As Int [write only]
    • Top As Int
    • Visible As Boolean
    • Width As Int


Sample

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim demo As WaveSideBar

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")


    demo.Initialize("demo")
    Activity.AddView(demo,0,0%y,100%x,100%y)
    demo.IndexItems=Array As String("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",0,1,2,3,4,5,6,7,8,9)
    demo.LazyRespond=True
    demo.TextColor=Colors.Yellow
    End Sub
Sub demo_selectindexitem(result As String)
    Log("Index "&result)
End Sub

If indexes are more than english alphabet letters , some letters might go off screen .
 

Attachments

  • WaveSideBar.zip
    8.1 KB · Views: 147
Top