mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Hide keyboard on detaching fragment
Do we really need to do this ourselves, Google?
This commit is contained in:
@@ -22,8 +22,6 @@ package eu.faircode.email;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -35,7 +33,7 @@ import android.widget.ProgressBar;
|
||||
|
||||
// https://developer.android.com/reference/android/webkit/WebView
|
||||
|
||||
public class FragmentWebView extends Fragment {
|
||||
public class FragmentWebView extends FragmentEx {
|
||||
private String url = null;
|
||||
|
||||
@Override
|
||||
@@ -58,6 +56,7 @@ public class FragmentWebView extends Fragment {
|
||||
webview.setWebViewClient(new WebViewClient() {
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
setSubtitle(url);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -72,13 +71,8 @@ public class FragmentWebView extends Fragment {
|
||||
|
||||
url = getArguments().getString("link");
|
||||
webview.loadUrl(url);
|
||||
setSubtitle(url);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
((AppCompatActivity) getActivity()).getSupportActionBar().setSubtitle(url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user