Can not resolve method ‘findViewById(int)’

You need to do this in onCreateView:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle   savedInstanceState) {
   View view =  inflater.inflate(R.layout.secondefragment, container, false);
    mWebView = (WebView) view.findViewById(R.id.activity_main_webview);
   progressBar = (ProgressBar) view.findViewById(R.id.progressBar1);

   WebSettings webSettings = mWebView.getSettings();
   webSettings.setJavaScriptEnabled(true);
   mWebView.loadUrl("http://www.google.com");

   return view;


}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)