package com.ss.android.ugc.aweme.shortvideo.widget;

import X.C2982NYz;
import android.view.GestureDetector;
import android.view.MotionEvent;
import com.bytedance.covode.number.Covode;

public class TabHost$1 implements GestureDetector.OnGestureListener {
    public final /* synthetic */ C2982NYz LIZ;

    static {
        Covode.recordClassIndex(113857);
    }

    public final boolean onDown(MotionEvent motionEvent) {
        return true;
    }

    public final void onLongPress(MotionEvent motionEvent) {
    }

    public final void onShowPress(MotionEvent motionEvent) {
    }

    public TabHost$1(C2982NYz nYz) {
        this.LIZ = nYz;
    }

    public final boolean onSingleTapUp(MotionEvent motionEvent) {
        C2982NYz nYz = this.LIZ;
        if (nYz.equals(nYz.LJIIJ) || this.LIZ.LJI.equals(this.LIZ.LJIIJ) || !this.LIZ.LJIIIIZZ.LIZ(this.LIZ.LJIIJ) || !this.LIZ.LIZLLL) {
            return false;
        }
        C2982NYz nYz2 = this.LIZ;
        nYz2.LIZ(nYz2.LJIIIZ, 0);
        return false;
    }

    public final boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
        if (this.LIZ.LIZJ && !this.LIZ.LIZ() && f2 < 20.0f) {
            this.LIZ.LJFF.fling(this.LIZ.LJFF.getFinalX(), this.LIZ.LJFF.getFinalY(), (int) f2, 0, 500, (int) f, 0, this.LIZ.getHeight());
        }
        return false;
    }

    public final boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
        if (!this.LIZ.LIZJ || this.LIZ.LIZ()) {
            return false;
        }
        if (f2 < 20.0f) {
            f2 = 20.0f;
        }
        this.LIZ.LJI.scrollBy((int) ((f * 20.0f) / f2), 0);
        this.LIZ.invalidate();
        return true;
    }
}
