B4J Library [B4X] [XUI] SD ElasticTrimmer

SD_ElasticTrimmer

Author:
Star-Dust
Version: 0.04
  • ElasticTrimmer
    • Events:
      • Change (Value As Int)
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase
      • Initialize (Callback As Object, EventName As String)
      • Invalidate
      • RemoveViewFromParent
      • RequestFocus
      • SendToBack
      • SetGradientColor (Color1 As Int, Color2 As Int)
      • Snapshot
    • Properties:
      • Enable As Boolean
      • Font As B4XFont
      • Height As Int
      • Left As Int
      • Tag As Object
      • Text As String
      • Top As Int
      • Value As String
      • Visible As Boolean
      • Width As Int

1.gif
 

Attachments

  • jSample.zip
    2.3 KB · Views: 528
  • aSample.zip
    9.4 KB · Views: 540
  • iSample.zip
    2.6 KB · Views: 485
  • SD_ElasticTrimmer.b4xlib
    2.7 KB · Views: 370
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update 0.02
  1. Add DOT and Corner in Design
  2. Add value proprety

I am attaching the example to create a TimePicker with ElasticTrimmer
ezgif.com-gif-maker.gif
 

Attachments

  • SampleTimePicker.zip
    2.8 KB · Views: 376
Last edited:

LucaMs

Expert
Licensed User
Longtime User
You could add a property that allows the user not to return the circle to its original shape and size. That way he could use it for other purposes ("draw").
Obviously in that case also the Dot (and perhaps the border) should be optional (boolean property).

index.png
 

Star-Dust

Expert
Licensed User
Longtime User
You could add a property that allows the user not to return the circle to its original shape and size. That way he could use it for other purposes ("draw").
Obviously in that case also the Dot (and perhaps the border) should be optional (boolean property).

View attachment 112253
The point is optional. You can choose it from the design.

Animation is not optional. I don't know what purposes it might serve to eliminate animation. Give an example
 

LucaMs

Expert
Licensed User
Longtime User
That way he could use it for other purposes ("draw").
1619363714818.png


Italian, sorry:
Potresti conservare l'animazione (ovviamente) ma quando rilasci il bordo, anziché disegnare di nuovo il cerchio iniziale, lasciare la forma corrente, distorta.
In questo modo otterresti delle view come quelle macchie, che come come view non credo servirebbero ma volendo solo disegnare potrebbe essere utile.
 

Star-Dust

Expert
Licensed User
Longtime User
View attachment 112276

Italian, sorry:
Potresti conservare l'animazione (ovviamente) ma quando rilasci il bordo, anziché disegnare di nuovo il cerchio iniziale, lasciare la forma corrente, distorta.
In questo modo otterresti delle view come quelle macchie, che come come view non credo servirebbero ma volendo solo disegnare potrebbe essere utile.
Ok, I got it. At the next update I will insert this option
 

Star-Dust

Expert
Licensed User
Longtime User
update rel 0.03
 

Star-Dust

Expert
Licensed User
Longtime User
update rel 0.04
  • Fix Bugs
 
Top