package com.tencent.mm.plugin.story.ui;

import a.l;
import android.view.ViewPropertyAnimator;
import android.widget.ImageView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.story.ui.view.gallery.l$b;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u0019\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\b\u0010\u0006\u001a\u00020\u0003H\u0016¨\u0006\u0007"}, dWq = {"com/tencent/mm/plugin/story/ui/StoryBrowseUI$onCreate$2", "Lcom/tencent/mm/plugin/story/ui/view/gallery/StoryGalleryView$IOnGalleryScale;", "onBgAlpha", "", "alpha", "", "onGalleryExitFromTop", "plugin-story_release"})
public final class StoryBrowseUI$b implements l$b {
    final /* synthetic */ StoryBrowseUI sew;

    StoryBrowseUI$b(StoryBrowseUI storyBrowseUI) {
        this.sew = storyBrowseUI;
    }

    public final void bc(float f) {
        AppMethodBeat.i(109989);
        ImageView a = StoryBrowseUI.a(this.sew);
        if (a != null) {
            a.setAlpha(f);
            AppMethodBeat.o(109989);
            return;
        }
        AppMethodBeat.o(109989);
    }

    public final void cCg() {
        long j = 0;
        AppMethodBeat.i(109990);
        com.tencent.mm.plugin.story.ui.view.gallery.l b = StoryBrowseUI.b(this.sew);
        if (b != null) {
            b.setEnabled(false);
            long height = (long) (((((float) b.getHeight()) - b.getTranslationY()) / ((float) b.getHeight())) * 300.0f);
            if (height >= 0) {
                j = height;
            }
            ImageView a = StoryBrowseUI.a(this.sew);
            if (a != null) {
                ViewPropertyAnimator animate = a.animate();
                if (animate != null) {
                    animate = animate.alpha(0.0f);
                    if (animate != null) {
                        animate = animate.setDuration(j);
                        if (animate != null) {
                            animate.start();
                        }
                    }
                }
            }
            b.animate().translationY((float) b.getHeight()).setDuration(j).withEndAction((Runnable) new a(this)).start();
            AppMethodBeat.o(109990);
            return;
        }
        AppMethodBeat.o(109990);
    }
}
