2
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.button1:
// app icon in Action Bar clicked; go home
Intent intent = new Intent(this, ClientInfoActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
我想在我的應用程序頁面中實現動作欄。上面的代碼不起作用。有什麼建議麼?android動作欄