public int addFooterView(View footer, int index, int orientation) {
        if (mFooterLayout == null) {
            mFooterLayout = new LinearLayout(footer.getContext());
            if (orientation == LinearLayout.VERTICAL) {
                mFooterLayout.setOrientation(LinearLayout.VERTICAL);
                mFooterLayout.setLayoutParams(new LayoutParams(MATCH_PARENT, WRAP_CONTENT));
            } else {
                mFooterLayout.setOrientation(LinearLayout.HORIZONTAL);
                mFooterLayout.setLayoutParams(new LayoutParams(WRAP_CONTENT, MATCH_PARENT));
            }
        }
        final int childCount = mFooterLayout.getChildCount();
        if (index < 0 || index > childCount) {
            index = childCount;
        }
        mFooterLayout.addView(footer, index);
        if (mFooterLayout.getChildCount() == 1) {
            int position = getFooterViewPosition();
            if (position != -1) {
                notifyItemInserted(position);
            }
        }
        return index;
    }
Add footer view to mFooterLayout and set footer view position in mFooterLayout.
When index = -1 or index >= child count in mFooterLayout,
the effect of this method is the same as that of {@link #addFooterView(View)}.

@param footer
@param index  the position in mFooterLayout of this footer.
              When index = -1 or index >= child count in mFooterLayout,
              the effect of this method is the same as that of {@link #addFooterView(View)}.
common/src/main/java/com/sxjs/common/base/baseadapter/BaseQuickAdapter.java