If you are developing with B4A then you should use B4A api. There is no reason to use reflection here.
B4X:
Sub TextSize(Target As Object) As Double
Dim lbl As Label = Target
Return lbl.TextSize
End Sub
Sub Typeface(Target As Object) As Typeface
Dim lbl As Label = Target
Return lbl.Typeface
End Sub
If you are developing with B4A then you should use B4A api. There is no reason to use reflection here.
B4X:
Sub TextSize(Target As Object) As Double
Dim lbl As Label = Target
Return lbl.TextSize
End Sub
Sub Typeface(Target As Object) As Typeface
Dim lbl As Label = Target
Return lbl.Typeface
End Sub
What exactly do you want to do ? I saw quite some threads and posts about almost the same problem.
So, please explain what is your foundamental problem or concern !
I have the feeling that we are turning in circle. You ask questions for 'detailed problems', but you don't explain your REAL expectations or needs.
I had never the need for any of your requests which couldn't be solved with STANDARD B4A properties or methods.
Yes you right
I initilize button by canvas
Canvas1.initialize(lbl)
And my btn changed to label
After using canvas1.initialize(activity)
Now its working