Pucci0095 New Member Licensed User Feb 9, 2018 #1 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: Code: Copy 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
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: Code: Copy 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
LucaMs Expert Licensed User Longtime User Feb 9, 2018 #2 https://www.b4x.com/android/forum/t...rent-method-implementation.54269/#post-340979 Upvote 0
klaus Expert Licensed User Longtime User Feb 9, 2018 #3 You might have a look at the B4X CustomViews booklet, link in my signature. It includes example projects with source code. Upvote 0
You might have a look at the B4X CustomViews booklet, link in my signature. It includes example projects with source code.
Pucci0095 New Member Licensed User Feb 9, 2018 #4 Thanks a lot. The answares are very appreciate! Last edited: Feb 11, 2018 Upvote 0