Open edwingsm opened 11 years ago
its most likely because your web service call are a) on the main thread or b) starting up worker threads in an enviroment that can only really have one thread executing at a time so the ui thread does not have as much processor time as it needs to remain smooth - if its B just delay you web service call until the draw has animated shut :)
Well i calling my web service in a separate thread other than ui thread . I will try to go with your second suggestion
yes - i am in fact doing the exact same thing today - will let you know how i get on
from the official sliding drawer docs
"DrawerLayout.DrawerListener can be used to monitor the state and motion of drawer views. Avoid performing expensive operations such as layout during animation as it can cause stuttering; try to perform expensive operations during the STATE_IDLE state. DrawerLayout.SimpleDrawerListener offers default/no-op implementations of each callback method."
http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
yeah half second delay works wonders :)
I use this library in my app . I will explain my scenario . My slide menu contains 10 items . For some menu items I call web services inside onStart() of fragments loaded on the click of menu items But it will provide a jerky effect on closing animation of slide menu . If there is no web service call it works fine and smooth .
Also on menu item click i clear the back stack of fragment manger .
I see this issue with only the fragments using web services .Can you tell me what was wrong with my implementation