AnderWeb / android_packages_apps_Launcher

Android Launcher (almostNexus mod)
http://forum.xda-developers.com/showthread.php?t=645550
Other
321 stars 151 forks source link

Scroll slow #55

Open leiyuanhua opened 13 years ago

leiyuanhua commented 13 years ago

when more and more application added to the phone,(for example has 4 pages in the AllAppsSlidingView) the scroll become slow(snap CurrentScreen to the NextScreen in AllAppsSlidingView).You find this problem?

AnderWeb commented 13 years ago

Yes, but i don't know howto solve...

leiyuanhua commented 13 years ago

may be in the AllAppsSlidingView have other problem: difficult to judge user's scroll or click a application. often scroll the screen I want snap to next screen but open one application

leiyuanhua commented 13 years ago

can you tell me which code cause this happen?

leiyuanhua commented 13 years ago

I find if you last scroll right,now you scroll left this will scroll fast,but if you also scroll right,this will become very slow,why this happen?

leiyuanhua commented 13 years ago

I think cache five page may be increase speed,the code modify as follow: AllAppsSlidingView.java->layoutChildren: makePage(mCurrentScreen-2); makePage(mCurrentScreen-1); makePage(mCurrentScreen); makePage(mCurrentScreen+1); makePage(mCurrentScreen+2; AllAppsSlidingView.java->addRemovePages: if(current>next){ //Going left addPage=next-2; removePage=current+2; }else{ //Going right addPage=next+2; removePage=current-2; }