android - Which listener gets triggered when the mapview's dimensions change from their initial (zero) state? -


i'm implementing lazy drawing of overlays based on user's current viewing rectangle. viewing rectangle gets initialized based on dimensions of mapview follows:

rect viewrectangle = new rect(0, 0, mapview.getwidth(), mapview.getheight()); 

through debugging, width , height of mapview remain constant (except when there's orientation change) except initial creation of mapview dimensions (width , height) zero.

unfortunately, despite attempts @ holding off initialization until of other ui components have been created, can't seem find proper place creation of viewing rectangle. not want place initialization within drawing of overlays because seems theoretically inefficient (with allocation overhead , potentially triggering garbage collection) create temporary objects every lazy-drawing call (triggered zooming, panning, , restful data refreshes).

is there listener gets triggered when dimensions of mapview changed 0 state? i've tried multitude of different searches find answer , searched through android documentation, no avail.

any information appreciated. in advance.

i ended doing in ondraw overlay.

i checked out different methods, never found solution.

best add boolean check execute code once. keep track of orientation changes...


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -