I\'m using the Google DrawerLayout
.
When an item gets clicked, the drawer is smoothly closed and an Activity
will be launched. Turning thes
Google IOsched 2015 runs extremely smoothly (except from settings) the reason for that is how they've implemented the drawer and how they launch stuff.
First of they use handler to launch delayed:
// launch the target Activity after a short delay, to allow the close animation to play
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
goToNavDrawerItem(itemId);
}
}, NAVDRAWER_LAUNCH_DELAY);
with delay being:
private static final int NAVDRAWER_LAUNCH_DELAY = 250;
Another thing they do is to remove animations from the activities that are launched with following code inside the activities onCreate():
overridePendingTransition(0, 0);
To view the source go to git.