侧拉箭头动画
2017-04-10 本文已影响0人
Swerve
private void initView() {
ActionBar ab=getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
DrawerLayout drawer=(DrawerLayout) findViewById(R.id.drawer);
//把ActionBar和DrawerLayout绑定
abt = new ActionBarDrawerToggle(this, drawer, R.string.drawer_open, R.string.drawer_close);
//改变图标
abt.syncState();
//显示动画
drawer.setDrawerListener(abt);
}