2017年5月11日 星期四

Up Navigate from Settings Activity to Main Activity

Override Original Method in Setting Activity
 @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

沒有留言 :

張貼留言