i have 2 activity Activity-1 and Activity-2 ..... Activity-2 has fragments fragment-1 and fragment-2 and fragment-3 The work flow is.. Activity 1 ---> Activity 2---> fragment 1 ---> fragment 2 ---> fragment --->3 but i am trying back the following sequence.. fragment 3 ---> fragment 2 ---> fragment --->1 Activity 2 ---> Activity 1
i have used
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
it shows an back button left of the ActionBarActivity
i can get the click event here...
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
//do your own thing here
return true;
default: return super.onOptionsItemSelected(item);
}
}
what should i do ?????