Refresh Fragment Him Self

孤街浪徒 提交于 2019-12-13 04:14:20

问题


It's possible refresh an fragment him self? Like an activity

context.finish();
context.startActivity(context.getIntent());

回答1:


I haven't tested, but maybe something like

getActivity().getSupportFragmentManager().beginTransaction()
                .replace(R.id.the_fragment_container, new MyFragment())
                .commit();


来源:https://stackoverflow.com/questions/18517938/refresh-fragment-him-self

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