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);
}
网友评论