Monday, 15 July 2013

android - Path on Canvas sometimes isn't visible -



android - Path on Canvas sometimes isn't visible -

i'm overriding imageview, , in ondraw method draw path on top of it. imageview view shown in listview.

on first render, image there, path isn't. if scroll down, images have paths, , when scroll up, first imageviews didn't show paths. know ondraw beingness called first imageviews, because set break in there.

the thing can think of maybe path beingness drawn before image? doesn't work way in code though. in fact, phone call setimagebitmap set image, in turn calls invalidate, in turn schedules ondraw. , ondraw calls super first.

disabling hardware acceleration has no effect.

well sense little dumb, figured out. here's reply in case makes same error did.

for reason, overriding onmeasure set dimensions of path i'll drawing. obviously, needs go in onlayout. first time view drawn it's size 0 when measured, path bunch of points on 0,0 coordinate. subsequent renders using recycled views, the listview, did have width , height when measured.

android

No comments:

Post a Comment