@Override
    public LayoutParams generateLayoutParams(AttributeSet attrs) {
        return new FrameLayout.LayoutParams(getContext(), attrs);
    }
Set the top view and add the fling listener
library/src/main/java/com/lorentzos/flingswipe/SwipeFlingAdapterView.java