2017年5月11日 星期四

Up Navigate from Settings Activity to Main Activity

Override Original Method in Setting Activity
1
2
3
4
5
6
7
8
9
10
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
super.onBackPressed();
return true;
}
return super.onOptionsItemSelected(item);
}
cited from Stack Overflow

沒有留言 :

張貼留言