I have the following question: when I return from one activity to another, I need certain element of menu to be opened. For example:
Now, when I click "Up" in my activity the first element of menu is always opened (where the running man is drawed). And I need to make such element opened, which was opened before opening new activity. For example I choose an article in Articles menu element and after clicking Up in new activity I want to be opened Articles element again. I tried to realize it as clicking on Back button:
@Override
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()){
case R.id.home:
this.finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
But it didn't help. What's the matter?