Android Question Works....but how

Discussion in 'Android Questions' started by tremara1, Mar 10, 2015.

  1. tremara1

    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)
    Code:
    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
     
  2. klaus

    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.
     
  3. tremara1

    tremara1 Active Member Licensed User

    that makes sense.....just needed to make sure I was not doing something wrong(code wise)......
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice