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

import a.f.a.m;
import a.f.a.q;
import a.f.b.j;
import a.l;
import a.y;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.h;
import android.support.v7.widget.RecyclerView.i;
import android.util.AttributeSet;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.story.ui.b.b;

@l(dWo = {1, 1, 13}, dWp = {"\u0000b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\u0018\u0000 -2\u00020\u0001:\u0001-B\u0019\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\u0002\u0010\u0006B\u000f\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0007B\u001f\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\b\u001a\u00020\t¢\u0006\u0002\u0010\nJ\u0016\u0010\u0012\u001a\u00020\u00192\u0006\u0010\u0016\u001a\u00020\t2\u0006\u0010(\u001a\u00020)J\u000e\u0010*\u001a\u00020\u00192\u0006\u0010+\u001a\u00020,R\u0010\u0010\u000b\u001a\u0004\u0018\u00010\fX\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\r\u001a\u0004\u0018\u00010\u0001X\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\u000e\u001a\u00020\u000f¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011Re\u0010\u0012\u001aM\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0014\u0012\b\b\u0015\u0012\u0004\b\b(\u0016\u0012\u0015\u0012\u0013\u0018\u00010\u0001¢\u0006\f\b\u0014\u0012\b\b\u0015\u0012\u0004\b\b(\u0017\u0012\u0015\u0012\u0013\u0018\u00010\f¢\u0006\f\b\u0014\u0012\b\b\u0015\u0012\u0004\b\b(\u0018\u0012\u0004\u0012\u00020\u0019\u0018\u00010\u0013X\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u001dRL\u0010\u001e\u001a4\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0014\u0012\b\b\u0015\u0012\u0004\b\b( \u0012\u0013\u0012\u00110!¢\u0006\f\b\u0014\u0012\b\b\u0015\u0012\u0004\b\b(\"\u0012\u0004\u0012\u00020\u0019\u0018\u00010\u001fX\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b#\u0010$\"\u0004\b%\u0010&R\u000e\u0010'\u001a\u00020\tX\u000e¢\u0006\u0002\n\u0000¨\u0006."}, dWq = {"Lcom/tencent/mm/plugin/story/ui/view/gallery/GalleryRecyclerView;", "Landroid/support/v7/widget/RecyclerView;", "context", "Landroid/content/Context;", "attrs", "Landroid/util/AttributeSet;", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "(Landroid/content/Context;)V", "defStyle", "", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "childControlView", "Lcom/tencent/mm/plugin/story/ui/view/gallery/GalleryHorizontalControlView;", "childRecyclerView", "layoutManager", "Lcom/tencent/mm/plugin/story/ui/layout/GalleryLayoutManager;", "getLayoutManager", "()Lcom/tencent/mm/plugin/story/ui/layout/GalleryLayoutManager;", "onRowSelected", "Lkotlin/Function3;", "Lkotlin/ParameterName;", "name", "row", "rowView", "pageControl", "", "getOnRowSelected", "()Lkotlin/jvm/functions/Function3;", "setOnRowSelected", "(Lkotlin/jvm/functions/Function3;)V", "onScrollCallback", "Lkotlin/Function2;", "position", "", "offset", "getOnScrollCallback", "()Lkotlin/jvm/functions/Function2;", "setOnScrollCallback", "(Lkotlin/jvm/functions/Function2;)V", "selectedRow", "child", "Landroid/view/View;", "setScrollEnable", "enabled", "", "Companion", "plugin-story_release"})
public final class GalleryRecyclerView extends RecyclerView {
    private static final String TAG = TAG;
    public static final a snX = new a((byte) 0);
    int rZb;
    private final b snT;
    RecyclerView snU;
    q<? super Integer, ? super RecyclerView, ? super GalleryHorizontalControlView, y> snV;
    private m<? super Integer, ? super Float, y> snW;

    public GalleryRecyclerView(Context context, AttributeSet attributeSet, int i) {
        j.p(context, "context");
        super(context, attributeSet, i);
        AppMethodBeat.i(110729);
        this.snT = new b(context);
        setLayoutManager((i) this.snT);
        this.snT.lqs = (m) new 1(this);
        this.snT.shb = (m) new 2(this);
        b((h) new b(1));
        setItemAnimator(null);
        setItemViewCacheSize(0);
        AppMethodBeat.o(110729);
    }

    public GalleryRecyclerView(Context context, AttributeSet attributeSet) {
        j.p(context, "context");
        this(context, attributeSet, 0);
        AppMethodBeat.i(110730);
        AppMethodBeat.o(110730);
    }

    static {
        AppMethodBeat.i(110731);
        AppMethodBeat.o(110731);
    }

    public final b getLayoutManager() {
        return this.snT;
    }

    public final q<Integer, RecyclerView, GalleryHorizontalControlView, y> getOnRowSelected() {
        return this.snV;
    }

    public final void setOnRowSelected(q<? super Integer, ? super RecyclerView, ? super GalleryHorizontalControlView, y> qVar) {
        this.snV = qVar;
    }

    public final m<Integer, Float, y> getOnScrollCallback() {
        return this.snW;
    }

    public final void setOnScrollCallback(m<? super Integer, ? super Float, y> mVar) {
        this.snW = mVar;
    }

    public final void setScrollEnable(boolean z) {
        AppMethodBeat.i(110728);
        this.snT.shc = z;
        RecyclerView recyclerView = this.snU;
        i layoutManager = recyclerView != null ? recyclerView.getLayoutManager() : null;
        if (layoutManager instanceof b) {
            ((b) layoutManager).shc = z;
        }
        AppMethodBeat.o(110728);
    }
}
