Android Question Works....but how

tremara1

Active Member
Licensed User
I have been paying around with resizing text to fit view. I created a small class with some code I got from Erel's autoLabel custom view. In the class, the sub that calculates, you pass the view name(lbl) and view text(value)
B4X:
stL(lbl As Label,value As String)
but I am passing edittexts, buttons etc. not just labels but it still works. Is this ok.......?
I have uploaded the project to Dropbox it is just a test app. Link: https://www.dropbox.com/s/e3tl6tujax4z9gf/TestScript.zip?dl=0
 

klaus

Expert
Licensed User
If I remember well, Label is a TextView and the others are subclasses of a TextView that's the reason why it works without any error.
 

tremara1

Active Member
Licensed User
that makes sense.....just needed to make sure I was not doing something wrong(code wise)......
 
Top