B4A Library BifacialView

A wrap for this Github project. Posting
1. B4A library files
2. Sample project

Copy the library files to your additional library folder

Donationware.

1.gif


Library:
BifacialView
Author:
Github: Bakht Ergashev, Wrapped by: Johan Schoeman
Version: 1
  • BifacialView
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • 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]
    • DelimiterColor As Int [write only]
    • DelimiterWidth As Int [write only]
    • DrawableLeft As Drawable [write only]
    • DrawableRight As Drawable [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • LeftText As String [write only]
    • Padding()() As Int
    • Parent As Object [read only]
    • RightText As String [write only]
    • Tag As Object
    • TheTextSize As Int [write only]
    • TheTextcolor As Int [write only]
    • Top As Int
    • Visible As Boolean
    • Width As Int

Sample code:
B4X:
#Region  Project Attributes
    #ApplicationLabel: b4aBifacialView
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private bv1 As BifacialView
 
    Dim mbmd1 As BitmapDrawable
    Dim mbmd2 As BitmapDrawable
 
    Dim mbm1 As Bitmap
    Dim mbm2 As Bitmap
 
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("main")
 
 
    mbm1.Initialize(File.DirAssets,"left.jpg")
    mbm2.Initialize(File.DirAssets,"right.jpg")
    mbmd1.Initialize(mbm1)
    mbmd2.Initialize(mbm2)
 
    bv1.DrawableLeft = mbmd1
    bv1.DrawableRight = mbmd2
 
    bv1.LeftText = "HELLO"
    bv1.RightText = "GOOD BYE"
    bv1.TheTextSize = 30
    bv1.TheTextcolor = Colors.Magenta
    bv1.DelimiterColor = Colors.Green
    bv1.DelimiterWidth = 25
 

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 

Attachments

  • ba4LibFiles.zip
    22.1 KB · Views: 179
  • b4aBifacialView.zip
    216.3 KB · Views: 177
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Top