wear/src/main/java/androidx/wear/widget/drawer/FlingWatcherFactory.java
@Nullable
    private FlingWatcher createFor(View view) {
        if (view == null) {
            throw new IllegalArgumentException("View was null");
        }

        if (view instanceof RecyclerView) {
            return new RecyclerViewFlingWatcher(mListener, (RecyclerView) view);
        } else if (view instanceof AbsListView) {
            return new AbsListViewFlingWatcher(mListener, (AbsListView) view);
        } else if (view instanceof ScrollView) {
            return new ScrollViewFlingWatcher(mListener, (ScrollView) view);
        } else if (view instanceof NestedScrollView) {
            return new NestedScrollViewFlingWatcher(mListener, (NestedScrollView) view);
        } else {
            return null;
        }
    }
/**
     * Creates a {@link FlingWatcher} for the particular type of {@link View}.
     */
Creates a  FlingWatcher for the particular type of  View.
Creates a FlingWatcher for the particular type of View .
@Nullable
    private FlingWatcher createFor(View view) {
        if (view == null) {
            throw new IllegalArgumentException("View was null");
        }
        if (view instanceof RecyclerView) {
            return new RecyclerViewFlingWatcher(mListener, (RecyclerView) view);
        } else if (view instanceof AbsListView) {
            return new AbsListViewFlingWatcher(mListener, (AbsListView) view);
        } else if (view instanceof ScrollView) {
            return new ScrollViewFlingWatcher(mListener, (ScrollView) view);
        } else if (view instanceof NestedScrollView) {
            return new NestedScrollViewFlingWatcher(mListener, (NestedScrollView) view);
        } else {
            return null;
        }
    }
@ Nullable private FlingWatcher createFor ( View view ) { if ( view == null ) { throw new IllegalArgumentException ( "View was null" ) ; } if ( view instanceof RecyclerView ) { return new RecyclerViewFlingWatcher ( mListener , ( RecyclerView ) view ) ; } else if ( view instanceof AbsListView ) { return new AbsListViewFlingWatcher ( mListener , ( AbsListView ) view ) ; } else if ( view instanceof ScrollView ) { return new ScrollViewFlingWatcher ( mListener , ( ScrollView ) view ) ; } else if ( view instanceof NestedScrollView ) { return new NestedScrollViewFlingWatcher ( mListener , ( NestedScrollView ) view ) ; } else { return null ; } }
Creates a {@link FlingWatcher} for the particular type of {@link View}.
Creates a { @link FlingWatcher } for the particular type of { @link View } .