подскажите в чем проблема, не работает кнопка назад в приложени
public class Tab1 extends Fragment {
public WebView mWebView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v=inflater.inflate(R.layout.tab1, container, false);
mWebView = (WebView) v.findViewById(R.id.webViewT1);
mWebView.loadUrl("file:///android_asset/Maps/web/map.html");
mWebView.getSettings().setBuiltInZoomControls(true);
mWebView.getSettings().setDisplayZoomControls(false);
// Enable Javascript
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
// Force links and redirects to open in the WebView instead of in a browser
mWebView.setWebViewClient(new WebViewClient());
return v;
}
public void onBackPressed(){
if (mWebView.canGoBack()) {
mWebView.goBack();
}
}
}