Cannot resolve method findViewById for progress-bar : Cannot resolve method findViewById for progress-bar
i want show a progress-bar for my webview, and it should stop once the loading is finished ,here is my code , but when i call progressbar it showing **Cannot resolve method findViewById** 
 

    package com.fb.jaisonjoseph.facebookbasic;


    import android.content.Context;
    import android.graphics.Bitmap;
    import android.net.ConnectivityManager;
    import android.net.NetworkInfo;
    import android.os.Bundle;
    import android.support.v4.app.Fragment;
    import android.view.LayoutInflater;
    import android.view.ViewGroup;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
    import android.widget.ProgressBar;


    /**
     * A simple {@link Fragment} subclass.
    */
     public class Home_Fragment extends Fragment {

    public WebView mwebView;
    public Home_Fragment() {

        // Required empty public constructor
    }





    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View rootView = inflater.inflate(R.layout.fragment_home_, null);
        WebView view=(WebView) rootView.findViewById(R.id.webView);
        view.loadUrl("https://mbasic.facebook.com");
        view.getSettings().setJavaScriptEnabled(true);
        view.setWebViewClient(new MyWebViewClient());
        return rootView;
    }

    private class MyWebViewClient extends WebViewClient {
        ProgressBar bar=(ProgressBar)findViewById(R.id.progressBar);

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            return false;
        }

        @Override
        public void onPageStarted(final WebView view, final String url, final Bitmap favicon) {
            bar.setVisibility(View.VISIBLE);

            super.onPageStarted(view, url, favicon);
        }
        @Override
        public void onPageFinished(WebView view, String url) {
            bar.setVisibility(View.GONE);

            super.onPageFinished(view, url);
            }
        }

     }
