views:

113

answers:

2

what is the difference between setHeight and setTextSize?

A: 

I'm assuming you're talking about a TextView. setHeight() sets the view's height, and setTextSize() sets how large the text will be within the view. Thus, a view can take up more space than just its text, which comes into play when using layouts such as RelativeLayout.

Andy Zhang
A: 

setHeight is the height of your component and if you have set seTextSize to 15 in component, it will allow only 15 characters in that component.

Nishant Shah
I think setTextSize() is actually the "dimensions" of your text, not the character limit:JavaDoc:"Set the default text size to the given value, interpreted as "scaled pixel" units. This size is adjusted based on the current density and user font size preference."
Andy Zhang