It is quite often that I want to perform an action that cannot be performed until the window has been generated, for example if I want to count the rows in an edittext. Right now my solution is to extend the object and override the onDraw-function to perform my action. But it feels as if there should be a neater way. Any suggestions?
Perhaps somewhere in the activity's lifecycle? It depends. Is it action per component or action per "window" activity? Is it just the first time or every time the activity/component has been intialized?