How does NavUtils.navigateUpFromSameTask work?

左心房为你撑大大i 提交于 2019-12-10 15:26:20

问题


please what is actuall behavior of this method? I thought that when bind this method call to my actionbar back button and also set the homepageactivity name in Manifest.xml, it should be then opened after the click in the button - regardless of the current task stack.. For example, when I open my Activity from widget, the parent Activity is not in BackStack - this is what I want to solve..I know I can somehow build my own taskstack, but I just thought, that this should be prebaked solution, shouldn't be? Right now it sends me back to the homescreen.. This is where I call it..the code is located in onOptionsItemSelected

 case android.R.id.home: 
            NavUtils.navigateUpFromSameTask(this);
            //finish();
            return true;

来源:https://stackoverflow.com/questions/18941355/how-does-navutils-navigateupfromsametask-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!