public WindowAssert isFloating() { isNotNull(); assertThat(actual.isFloating()) // .overridingErrorMessage("Expected to be floating but was not floating.") // .isTrue(); return this; }
public WindowAssert isNotFloating() { isNotNull(); assertThat(actual.isFloating()) // .overridingErrorMessage("Expected to not be floating but was floating.") // .isFalse(); return this; }
public WindowAssert isNotFloating() { isNotNull(); assertThat(actual.isFloating()) // .overridingErrorMessage("Expected to not be floating but was floating.") // .isFalse(); return this; }
public WindowAssert isFloating() { isNotNull(); assertThat(actual.isFloating()) // .overridingErrorMessage("Expected to be floating but was not floating.") // .isTrue(); return this; }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.license_activity_layout); webView = (WebView) findViewById(R.id.licenseWebview); if (getWindow().isFloating()) { WindowManager.LayoutParams layout = new WindowManager.LayoutParams(); layout.copyFrom(getWindow().getAttributes()); layout.height = WindowManager.LayoutParams.MATCH_PARENT; getWindow().setAttributes(layout); } webView.loadUrl("file:///android_asset/licenses.html"); }
@Override @NonNull public LayoutInflater onGetLayoutInflater(Bundle savedInstanceState) { if (getShowsDialog()) { setStyle(0, R.style.Theme_Nav_FullScreenDialog); } super.onGetLayoutInflater(savedInstanceState); LayoutInflater layoutInflater = requireActivity().getLayoutInflater(); if (getShowsDialog() && !getWindow().isFloating()) { layoutInflater = new DialogLayoutInflater(requireContext(), layoutInflater, new DialogFrameLayout.OnTouchOutsideListener() { @Override public void onTouchOutside() { if (isCancelable()) { dismissDialog(); } } }); } if (style == null) { try { style = presentableActivity.getStyle().clone(); onCustomStyle(style); } catch (CloneNotSupportedException e) { e.printStackTrace(); style = presentableActivity.getStyle(); } } return layoutInflater; }