activity中访问内部fragment的函数

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

if (resultCode == Activity.RESULT_OK) {
if (resultCode == Activity.RESULT_OK) {
FragmentManager fragmentManager = getSupportFragmentManager();
Home_SverListFragment ttFragment = (Home_SverListFragment) fragmentManager.findFragmentById(R.id.listView);
if (ttFragment == null)
Log.d("debug", "onActivityResult: Home_SverListFragment is null");

ttFragment.refreshSverListView(ServiceSearch.search());
return;
}
}

}

posted @ 2015-02-10 19:11  Bigben  阅读(524)  评论(0编辑  收藏  举报