Android Question Module? Class? Library?

sultan87

Active Member
Licensed User
Longtime User
Hello,
I wrote code that allows me to display a waiting with drawing and text.
I wish I could use it in many activities without being obliged to réinserrer the code in all activities.
how to do?
Best regards
 

Attachments

Classes are the best option for reusable code.

See the custom view examples (though you don't need to implement your class as a custom view): https://www.b4x.com/android/forum/pages/results/?query=custom view

https://www.b4x.com/android/forum/threads/18626/#content
hello,
thank's for your response
I have difficulty understanding
could you do me this example with the following code?

Dim panel_wait As Panel
Dim wait As WhorlView (library)

panel_wait.Initialize("")
panel_wait.Color = Colors.Transparent
Activity.AddView(panel_wait,0,0,480,800)

' Attente Cercle

wait.Initialize("")
wait.SweepAngle = 200
wait.StrokeWidth = 5
wait.LayerColors = Array As Int(Colors.Blue,Colors.Red,Colors.Yellow,Colors.Green)
wait.AddToParent(panel_wait,130,275,250,250)

wait.start


Best regards
 
Upvote 0
Back
Top