performance - Android ProgressBar skipping frames -
i'm loading twenty items (webviews) linearlayout , while loading i'm showing progressbar hides linearlayout provide feedback user i'm doing work.
the problem progress wheel freezes , warning in logcat choreographer saying "skipped frames! application may doing work on main thread."
to avoid problem tried change using linearlayout 20 items , using listview adapter. ran webview recycling problems, eliminated recycling , used array of 20 items , every time listview needs load item, loads array if inflated before.
then got problem can't scroll specified item because listview loads webviews when necessary can't calculate amount of scrolling needs done since heights of webviews vary.
conclusion, had linearlayout implementation adding webviews it.
is there solution problem? if there isn't, i'm thinking showing "loading..." textview instead of animated progressbar.
by way, before asks, i'm using nexus 4 test app , not emulator , i'm not doing database accesses in ui thread.
thanks in advance.
a webview
heavy , expensive object, every time add new webview
window, has initialized, measured , laid out. what's causing skip frames. check using traceview or systrace see you're spending time.
Comments
Post a Comment