@Test(expected = IllegalArgumentException.class) public void putActionWithInvalidDestinationId() { NavDestination destination = new NavDestination(mock(Navigator.class)); destination.putAction(INVALID_ACTION_ID, DESTINATION_ID); }
public void putAction(@IdRes int actionId, @IdRes int destId) { putAction(actionId, new NavAction(destId)); }
NavDestination { public void putAction(@IdRes int actionId, @IdRes int destId) { putAction(actionId, new NavAction(destId)); } }
NavDestination { public void putAction(@IdRes int actionId, @IdRes int destId) { putAction(actionId, new NavAction(destId)); } NavDestination(@NonNull Navigator<? extends NavDestination> navigator); }
NavDestination { public void putAction(@IdRes int actionId, @IdRes int destId) { putAction(actionId, new NavAction(destId)); } NavDestination(@NonNull Navigator<? extends NavDestination> navigator); @CallSuper void onInflate(@NonNull Context context, @NonNull AttributeSet attrs); @Nullable NavGraph getParent(); @IdRes int getId(); void setId(@IdRes int id); void setLabel(@Nullable CharSequence label); @Nullable CharSequence getLabel(); @NonNull Navigator getNavigator(); @NonNull Bundle getDefaultArguments(); void setDefaultArguments(@Nullable Bundle args); void addDefaultArguments(@NonNull Bundle args); void addDeepLink(@NonNull String uriPattern); @Nullable NavAction getAction(@IdRes int id); void putAction(@IdRes int actionId, @IdRes int destId); void putAction(@IdRes int actionId, @NonNull NavAction action); void removeAction(@IdRes int actionId); @SuppressWarnings("unchecked") void navigate(@Nullable Bundle args, @Nullable NavOptions navOptions); }
NavDestination { public void putAction(@IdRes int actionId, @IdRes int destId) { putAction(actionId, new NavAction(destId)); } NavDestination(@NonNull Navigator<? extends NavDestination> navigator); @CallSuper void onInflate(@NonNull Context context, @NonNull AttributeSet attrs); @Nullable NavGraph getParent(); @IdRes int getId(); void setId(@IdRes int id); void setLabel(@Nullable CharSequence label); @Nullable CharSequence getLabel(); @NonNull Navigator getNavigator(); @NonNull Bundle getDefaultArguments(); void setDefaultArguments(@Nullable Bundle args); void addDefaultArguments(@NonNull Bundle args); void addDeepLink(@NonNull String uriPattern); @Nullable NavAction getAction(@IdRes int id); void putAction(@IdRes int actionId, @IdRes int destId); void putAction(@IdRes int actionId, @NonNull NavAction action); void removeAction(@IdRes int actionId); @SuppressWarnings("unchecked") void navigate(@Nullable Bundle args, @Nullable NavOptions navOptions);  }