public static SpanSizeLookup getSpanSizeLookup(RecyclerView view) {
        LayoutManager layout = view.getLayoutManager();
        if (layout instanceof GridLayoutManager) {
            return ((GridLayoutManager) layout).getSpanSizeLookup();
        }
        if (sDefSpanSizeLookup == null) {
            sDefSpanSizeLookup = new DefaultSpanSizeLookup();
        }
        return sDefSpanSizeLookup;
    }
public static SpanSizeLookup getSpanSizeLookup(RecyclerView view) {
        LayoutManager layout = view.getLayoutManager();
        if (layout instanceof GridLayoutManager) {
            return ((GridLayoutManager) layout).getSpanSizeLookup();
        }
        if (sDefSpanSizeLookup == null) {
            sDefSpanSizeLookup = new DefaultSpanSizeLookup();
        }
        return sDefSpanSizeLookup;
    }
public static SpanSizeLookup getSpanSizeLookup ( RecyclerView view ) { LayoutManager layout = view . getLayoutManager ( ) ; if ( layout instanceof GridLayoutManager ) { return ( ( GridLayoutManager ) layout ) . getSpanSizeLookup ( ) ; } if ( sDefSpanSizeLookup == null ) { sDefSpanSizeLookup = new DefaultSpanSizeLookup ( ) ; } return sDefSpanSizeLookup ; }
If the RecyclerView uses a {@link GridLayoutManager}, get its SpanSizeLookup. Otherwise get a
{@link DefaultSpanSizeLookup DefaultSpanSizeLookup}.
If the RecyclerView uses a {