So far I have read how to load โregularโ html web pages into a web view. so far I am passing the url containing the path to my text file, but it is not loading anything. this is my method:
@Override public void onSelected(String url) { ViewerFragment viewer = (ViewerFragment) getSupportFragmentManager() .findFragmentById(R.id.view_fragment); if (viewer == null || !viewer.isInLayout()) { Intent showContent = new Intent(getApplicationContext(), ViewerFragment.class); showContent.setData(Uri.parse(url)); startActivity(showContent); } else { viewer.updateUrl(url); } }
and the viewer fragment received the following:
public class ViewerFragment extends Fragment{ private WebView viewer = null; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { viewer = (WebView) inflater .inflate(R.layout.details_fragment, container, false); return viewer; } public void updateUrl(String newUrl) { if (viewer != null) { viewer.loadUrl(newUrl); } } }
but keep getting this screen: 
any ideas how to do this? = / I already tried to work a little, but did not find much information about this ... in fact, almost did not find anything. Therefore any help would be appreciated.
source share