I\'m having a trouble with findViewByid
but I can\'t find where the problem is.
Here\'s my FirstFragment
class code:
import and
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;
}