public void setGravity(int gravity) {
        if (gravity != Gravity.TOP && gravity != Gravity.BOTTOM) {
            throw new IllegalArgumentException("gravity must be set to either top or bottom");
        }
        mIsSlidingUp = gravity == Gravity.BOTTOM;
        if (!mFirstLayout) {
            requestLayout();
        }
    }
Set the Drag View after the view is inflated
app/src/main/java/home/smart/fly/animations/widget/slidepanel/SlidingUpPanelLayout.java