There is a TextView
of a certain size and whenever text set to it is too long I\'d like to re-set it to some preset value.
To accomplish this I am overr
onMeasure()
is usually called during layout phase. Besides as far as I know onMeasure()
is where YOU have to measure your view. It receives 2 values which are the size of the parent of your view which may be constant.
Why don't you just check the length of the text you're setting and if it's too long just replace it with your default one?