merge
This commit is contained in:
parent
88e89bd102
commit
b53703401e
|
@ -17,6 +17,15 @@
|
||||||
- On Android, the `InAppWebView` widget uses hybrid composition by default (`useHybridComposition: true`).
|
- On Android, the `InAppWebView` widget uses hybrid composition by default (`useHybridComposition: true`).
|
||||||
- All properties of `GeolocationPermissionShowPromptResponse` cannot be `null`;
|
- All properties of `GeolocationPermissionShowPromptResponse` cannot be `null`;
|
||||||
|
|
||||||
|
## 5.4.3+6
|
||||||
|
|
||||||
|
- Fixed "iOS flutter_inappwebview/URLRequest.swift:13: Fatal error: Unexpectedly found nil while unwrapping an Optional value" [#1173](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1173)
|
||||||
|
|
||||||
|
## 5.4.3+5
|
||||||
|
|
||||||
|
- Fixed possible java.lang.NullPointerException in `Runnable` of `InputAwareWebView.setInputConnectionTarget` method
|
||||||
|
- Fixed "Android Crash in latest 5.4.3+4 - java.lang.NullPointerException: Attempt to invoke virtual method java.lang.String android.webkit.WebView.getUrl()" [#1168](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1168)
|
||||||
|
|
||||||
## 5.4.3+4
|
## 5.4.3+4
|
||||||
|
|
||||||
- Updated docs for `ChromeSafariBrowser.open` and throw error on iOS if the `url` parameter use a different scheme then `http` or `https`
|
- Updated docs for `ChromeSafariBrowser.open` and throw error on iOS if the `url` parameter use a different scheme then `http` or `https`
|
||||||
|
|
|
@ -219,51 +219,59 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
|
||||||
// Inflate menu to add items to action bar if it is present.
|
// Inflate menu to add items to action bar if it is present.
|
||||||
inflater.inflate(R.menu.menu_main, menu);
|
inflater.inflate(R.menu.menu_main, menu);
|
||||||
|
|
||||||
searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
|
MenuItem menuItem = menu.findItem(R.id.menu_search);
|
||||||
searchView.setFocusable(true);
|
if (menuItem != null) {
|
||||||
|
if (customSettings.hideUrlBar)
|
||||||
|
menuItem.setVisible(false);
|
||||||
|
|
||||||
if (customSettings.hideUrlBar)
|
searchView = (SearchView) menuItem.getActionView();
|
||||||
menu.findItem(R.id.menu_search).setVisible(false);
|
if (searchView != null) {
|
||||||
|
searchView.setFocusable(true);
|
||||||
|
|
||||||
searchView.setQuery(webView != null ? webView.getUrl() : "", false);
|
searchView.setQuery(webView != null ? webView.getUrl() : "", false);
|
||||||
|
|
||||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String query) {
|
public boolean onQueryTextSubmit(String query) {
|
||||||
if (!query.isEmpty()) {
|
if (!query.isEmpty()) {
|
||||||
webView.loadUrl(query);
|
if (webView != null)
|
||||||
searchView.setQuery("", false);
|
webView.loadUrl(query);
|
||||||
searchView.setIconified(true);
|
if (searchView != null) {
|
||||||
return true;
|
searchView.setQuery("", false);
|
||||||
}
|
searchView.setIconified(true);
|
||||||
return false;
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onQueryTextChange(String newText) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onClose() {
|
||||||
|
if (searchView != null && searchView.getQuery().toString().isEmpty())
|
||||||
|
searchView.setQuery(webView != null ? webView.getUrl() : "", false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View view, boolean b) {
|
||||||
|
if (!b && searchView != null) {
|
||||||
|
searchView.setQuery("", false);
|
||||||
|
searchView.setIconified(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public boolean onQueryTextChange(String newText) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onClose() {
|
|
||||||
if (searchView.getQuery().toString().isEmpty())
|
|
||||||
searchView.setQuery(webView.getUrl(), false);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onFocusChange(View view, boolean b) {
|
|
||||||
if (!b) {
|
|
||||||
searchView.setQuery("", false);
|
|
||||||
searchView.setIconified(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue