B4A Library Diagonalify

Just this simple thing https://github.com/developer-shivam/Diagonalify :D


DiagonalView
Author:
SMM
Version: 0.01
  • Diagonalify
    Events:
    • _click
    Fields:
    • GRAVITY_LEFT As String
    • GRAVITY_RIGHT As String
    • 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:
    • Angle As Int [write only]
    • Background As Drawable
    • BackgroundColor As Int [write only]
    • Color As Int [write only]
    • DiagonalColor As Int [write only]
    • DiagonalGravity As String [write only]
      GRAVITY_RIGHT or GRAVITY_LEFT fields
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • Tag As Object
    • 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 dv As Diagonalify
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")
    dv.Initialize("dv")
    Activity.AddView(dv,0,0,100%x,100%y)
    dv.DiagonalGravity=dv.GRAVITY_RIGHT
    dv.DiagonalColor=Colors.White
    dv.BackgroundColor=Colors.LightGray
    dv.Angle=30
   
End Sub
 

Attachments

  • DiagonalView.zip
    5.8 KB · Views: 304

Multiverse app

Active Member
Licensed User
Longtime User
Looks great!
Screenshot_2017-04-15-18-28-0000.png
 

jimmyF

Active Member
Licensed User
Longtime User
Very cool! I can and will use this.
It does seem, though, that the 'DiagonalColor' setting does not work.
Or, it is simply a case of 'we can have any colour we want, as long as it is White'
;)
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Very cool! I can and will use this.
It does seem, though, that the 'DiagonalColor' setting does not work.
Or, it is simply a case of 'we can have any colour we want, as long as it is White'
;)
Sorry I don't know why it does not work , all my wrapper does is calling original library method
 
Top