@Test public void holdsAView() { assertThat(uut.getView()).isNotNull().isInstanceOf(View.class); }
public T getView() { if (view == null) { if (isDestroyed) { throw new RuntimeException("Tried to create view after it has already been destroyed"); } view = createView(); view.setOnHierarchyChangeListener(this); view.getViewTreeObserver().addOnGlobalLayoutListener(this); } return view; }
ViewController implements ViewTreeObserver.OnGlobalLayoutListener, ViewGroup.OnHierarchyChangeListener { public T getView() { if (view == null) { if (isDestroyed) { throw new RuntimeException("Tried to create view after it has already been destroyed"); } view = createView(); view.setOnHierarchyChangeListener(this); view.getViewTreeObserver().addOnGlobalLayoutListener(this); } return view; } }
ViewController implements ViewTreeObserver.OnGlobalLayoutListener, ViewGroup.OnHierarchyChangeListener { public T getView() { if (view == null) { if (isDestroyed) { throw new RuntimeException("Tried to create view after it has already been destroyed"); } view = createView(); view.setOnHierarchyChangeListener(this); view.getViewTreeObserver().addOnGlobalLayoutListener(this); } return view; } ViewController(Activity activity, String id, YellowBoxDelegate yellowBoxDelegate, Options initialOptions); }
ViewController implements ViewTreeObserver.OnGlobalLayoutListener, ViewGroup.OnHierarchyChangeListener { public T getView() { if (view == null) { if (isDestroyed) { throw new RuntimeException("Tried to create view after it has already been destroyed"); } view = createView(); view.setOnHierarchyChangeListener(this); view.getViewTreeObserver().addOnGlobalLayoutListener(this); } return view; } ViewController(Activity activity, String id, YellowBoxDelegate yellowBoxDelegate, Options initialOptions); boolean isDestroyed(); void setWaitForRender(Bool waitForRender); void setOnAppearedListener(Runnable onAppearedListener); void setViewVisibilityListener(ViewVisibilityListener viewVisibilityListener); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE) void ensureViewIsCreated(); boolean handleBack(CommandListener listener); @CheckResult Options resolveCurrentOptions(); @CheckResult Options resolveCurrentOptions(Options defaultOptions); @CallSuper void mergeOptions(Options options); @CallSuper void applyOptions(Options options); void setDefaultOptions(Options defaultOptions); Activity getActivity(); @VisibleForTesting(otherwise = VisibleForTesting.PROTECTED) ParentController getParentController(); void setParentController(@NonNull final ParentController parentController); void performOnParentStack(Task<StackController> task); T getView(); void detachView(); void attachView(ViewGroup parent, int index); String getId(); @Nullable ViewController findController(String id); boolean containsComponent(Component component); void onViewWillAppear(); @CallSuper void onViewAppeared(); void onViewWillDisappear(); @CallSuper void onViewDisappear(); @CallSuper void destroy(); @Override void onGlobalLayout(); @Override void onChildViewAdded(View parent, View child); @Override void onChildViewRemoved(View view, View view1); abstract void sendOnNavigationButtonPressed(String buttonId); boolean isViewShown(); boolean isRendered(); List<Element> getElements(); }
ViewController implements ViewTreeObserver.OnGlobalLayoutListener, ViewGroup.OnHierarchyChangeListener { public T getView() { if (view == null) { if (isDestroyed) { throw new RuntimeException("Tried to create view after it has already been destroyed"); } view = createView(); view.setOnHierarchyChangeListener(this); view.getViewTreeObserver().addOnGlobalLayoutListener(this); } return view; } ViewController(Activity activity, String id, YellowBoxDelegate yellowBoxDelegate, Options initialOptions); boolean isDestroyed(); void setWaitForRender(Bool waitForRender); void setOnAppearedListener(Runnable onAppearedListener); void setViewVisibilityListener(ViewVisibilityListener viewVisibilityListener); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE) void ensureViewIsCreated(); boolean handleBack(CommandListener listener); @CheckResult Options resolveCurrentOptions(); @CheckResult Options resolveCurrentOptions(Options defaultOptions); @CallSuper void mergeOptions(Options options); @CallSuper void applyOptions(Options options); void setDefaultOptions(Options defaultOptions); Activity getActivity(); @VisibleForTesting(otherwise = VisibleForTesting.PROTECTED) ParentController getParentController(); void setParentController(@NonNull final ParentController parentController); void performOnParentStack(Task<StackController> task); T getView(); void detachView(); void attachView(ViewGroup parent, int index); String getId(); @Nullable ViewController findController(String id); boolean containsComponent(Component component); void onViewWillAppear(); @CallSuper void onViewAppeared(); void onViewWillDisappear(); @CallSuper void onViewDisappear(); @CallSuper void destroy(); @Override void onGlobalLayout(); @Override void onChildViewAdded(View parent, View child); @Override void onChildViewRemoved(View view, View view1); abstract void sendOnNavigationButtonPressed(String buttonId); boolean isViewShown(); boolean isRendered(); List<Element> getElements(); public Options options; }