Question

While I'm developing a custom widget by using TextView widget, this question comes up to my mind.

When mText(member variable of TextView) is displayed, actually?

I have thought that, just like other widgets, if I override the onDraw method in the custom widget, which is derived from TextView, I can draw mText as I want. But, it's not true.

I'm reviewing Android Widget source, and then I realized that mText is not displayed while onDraw is called, definitely.

Is there someone who knows about it?

Was it helpful?

Solution

take a look at protected makeNewLayout()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top