DrawerLayout layout = (DrawerLayout) findViewById(R.id.drawer);
ImageView imageView = (ImageView) findViewById(R.id.img);
final ListView listView = (ListView) findViewById(R.id.list);
//获取手机的菜单栏
final ActionBar actionBar = getActionBar();
actionBar.setTitle(“主界面”);
//标题栏的home可以点击
actionBar.setIcon(android.R.drawable.btn_radio);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
toggle = new ActionBarDrawerToggle(MainActivity.this,
layout, android.R.drawable.btn_star,
android.R.drawable.btn_star_big_on,
android.R.drawable.btn_star_big_off){
@Override
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
actionBar.setTitle(“主界面”);
}
@Override
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawe