android - Slow startup of second activity -
what should when settings activity
starting slow? anr keydispatch error
if takes long.
should using preferenceactivity
. absolute first time go settings delay time slow (about 5-10 seconds), otherwise goes super smooth. appear when i'm reinstalling application , start settings first time (so it's first time thing).
some code in settings preferenceactivity
:
@override protected void oncreate(bundle icicle) { super.oncreate(icicle); pref = getpreferencemanager(); pref.setsharedpreferencesname(livewallpaper.preferences); addpreferencesfromresource(r.xml.live); pref.getsharedpreferences().registeronsharedpreferencechangelistener(this); pref.findpreference("username").setonpreferenceclicklistener(new onpreferenceclicklistener() { public boolean onpreferenceclick(preference preference) { // stuff... return true; } } ); // , on...
basically, want find out error located, question how? can see in logcat that's causing delay?
thanks answer!
have tried running traceview measure taking long? guide in right direction. it's easy use within eclipse. in ddms view there button start using traceview.
Comments
Post a Comment