package com.tencent.mm.plugin.subapp.ui.gallery;

import android.view.View;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.tools.MMGestureGallery.b;

class GestureGalleryUI$12 implements b {
    final /* synthetic */ GestureGalleryUI sum;

    GestureGalleryUI$12(GestureGalleryUI gestureGalleryUI) {
        this.sum = gestureGalleryUI;
    }

    public final void aa(float f, float f2) {
        float f3 = 1.0f;
        AppMethodBeat.i(25392);
        float height = 1.0f - (f2 / ((float) GestureGalleryUI.a(this.sum).getHeight()));
        if (height <= 1.0f) {
            f3 = height;
        }
        ab.d("MicroMsg.GestureGalleryUI", "onGalleryScale tx: %f, ty: %f, scale: %f", new Object[]{Float.valueOf(f), Float.valueOf(f2), Float.valueOf(f3)});
        GestureGalleryUI.a(this.sum, f3);
        View cDI = GestureGalleryUI.f(this.sum).cDI();
        if (cDI != null) {
            cDI.setPivotX((float) (GestureGalleryUI.a(this.sum).getWidth() / 2));
            cDI.setPivotY((float) (GestureGalleryUI.a(this.sum).getHeight() / 2));
            cDI.setScaleX(f3);
            cDI.setScaleY(f3);
            cDI.setTranslationX(f);
            cDI.setTranslationY(f2);
            GestureGalleryUI.h(this.sum).setAlpha(f3);
            AppMethodBeat.o(25392);
            return;
        }
        ab.d("MicroMsg.GestureGalleryUI", "runDragAnimation contentView is null !!");
        AppMethodBeat.o(25392);
    }

    public final void ab(float f, float f2) {
        AppMethodBeat.i(25393);
        GestureGalleryUI.a(this.sum, (int) f);
        GestureGalleryUI.b(this.sum, (int) f2);
        AppMethodBeat.o(25393);
    }
}
