Android Question Problem with CustomView

Pucci0095

New Member
Licensed User
Hi all.

I'm new to the forum.


I've a little problem with custom class.

how can I turn my Base Panel into view, so that I can add it via code in an activity or another object, like a list?
EXAMPLE:


B4X:
Sub Globals

Dim myButton As mybutton

End sub

Sub Activity_Create(FirstTime As Boolean)

Activity.LoadLayout("mylayout")
myButton.Initialize(Me,"mybutton")

Activity.AddView(myButton,50dip,50dip,50dip,50dip)


End Sub

But custom view isn't a normal object. I had try to create in my customview's code a method to convert my panel to view.

But no positive result.
Anyone can help me ?





Thanks to anyone willing to help me:)
 

Pucci0095

New Member
Licensed User
Thanks a lot. The answares are very appreciate!
 
Last edited:
Upvote 0
Top