navigation/runtime/src/main/java/androidx/navigation/Navigation.java
@NonNull
    public static View.OnClickListener createNavigateOnClickListener(@IdRes final int resId,
            @Nullable final Bundle args) {
        return new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                findNavController(view).navigate(resId, args);
            }
        };
    }
/**
     * Create an {@link android.view.View.OnClickListener} for navigating
     * to a destination. This supports both navigating via an
     * {@link NavDestination#getAction(int) action} and directly navigating to a destination.
     *
     * @param resId an {@link NavDestination#getAction(int) action} id or a destination id to
     *              navigate to when the view is clicked
     * @param args arguments to pass to the final destination
     * @return a new click listener for setting on an arbitrary view
     */
Create an  android.view.View.OnClickListener for navigating
to a destination. This supports both navigating via an
NavDestination#getAction(int) action and directly navigating to a destination.

@param resId an  NavDestination#getAction(int) action id or a destination id to
navigate to when the view is clicked
@param args arguments to pass to the final destination
@return a new click listener for setting on an arbitrary view
Create an android . view . View . OnClickListener for navigating to a destination . This supports both navigating via an NavDestination#getAction ( int ) action and directly navigating to a destination . @param resId an NavDestination#getAction ( int ) action id or a destination id to navigate to when the view is clicked @param args arguments to pass to the final destination @return a new click listener for setting on an arbitrary view
@NonNull
    public static View.OnClickListener createNavigateOnClickListener(@IdRes final int resId,
            @Nullable final Bundle args) {
        return new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                findNavController(view).navigate(resId, args);
            }
        };
    }
@ NonNull public static View . OnClickListener createNavigateOnClickListener ( @ IdRes final int resId , @ Nullable final Bundle args ) { return new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { findNavController ( view ) . navigate ( resId , args ) ; } } ; }
Create an {@link android.view.View.OnClickListener} for navigating
 to a destination.
Create an { @link android . view . View . OnClickListener } for navigating to a destination .