Back to project page LearningAndroid2edYamba2.
The source code is released under:
Apache License
If you think the Android project LearningAndroid2edYamba2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.marakana.android.yamba; /* ww w. j a v a 2s. c o m*/ import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.MenuItem; public class SubActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Action bar stuff getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: startActivity(new Intent(this, MainActivity.class) .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)); default: return super.onOptionsItemSelected(item); } } }