There is a fragment of TwoFragment , it has a method

 WebView mWebView; public void reloadWebView() { mWebView.loadUrl("javascript:window.location.reload(true)"); } 

I MainActivity trying to use this method in MainActivity as follows:

 ExampleFragment fragment = (ExampleFragment) getFragmentManager().findFragmentById(R.id.example_fragment); 

It does not work, why?

  • one
    You received a link to the fragment but the method itself did not cause ... - YuriySPb
  • and how to call him, I'm already tired)) - elik
  • fragment.reloadWebView(); the same ... - JuriySPb
  • It’s not quite that doesn't work as I tried to recreate what I have. I already found a way to change the adapter - elik
  • made a global adapter and through the fragment immediately turned as - elik

0