package com.tencent.mm.plugin.sns.storage.AdLandingPagesStorage.AdLandingPageComponent.component.widget.verticalviewpager.adapter;

import android.view.ViewTreeObserver.OnPreDrawListener;
import android.widget.FrameLayout.LayoutParams;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.sns.storage.AdLandingPagesStorage.AdLandingPageComponent.component.h;
import com.tencent.mm.plugin.sns.storage.AdLandingPagesStorage.AdLandingPageComponent.component.widget.verticalviewpager.adapter.ContentFragment.7;
import com.tencent.mm.sdk.platformtools.ab;

class ContentFragment$7$1 implements OnPreDrawListener {
    final /* synthetic */ 7 rdv;

    ContentFragment$7$1(7 7) {
        this.rdv = 7;
    }

    public final boolean onPreDraw() {
        AppMethodBeat.i(37624);
        if (ContentFragment.a(this.rdv.rdr).rdz.getHeight() > 0) {
            ContentFragment.a(this.rdv.rdr).rdz.getViewTreeObserver().removeOnPreDrawListener(this);
            ContentFragment.b(this.rdv.rdr, ContentFragment.a(this.rdv.rdr).rdz.getHeight());
            if (ContentFragment.l(this.rdv.rdr) < ContentFragment.f(this.rdv.rdr)) {
                ContentFragment.b(this.rdv.rdr, ContentFragment.f(this.rdv.rdr));
            }
            LayoutParams layoutParams = (LayoutParams) ContentFragment.a(this.rdv.rdr).rdw.getLayoutParams();
            layoutParams.height = ContentFragment.l(this.rdv.rdr);
            ContentFragment.a(this.rdv.rdr).rdw.setLayoutParams(layoutParams);
            ab.i("ContentFragment", "set bgIV height " + ContentFragment.a(this.rdv.rdr).rdz.getHeight() + ", count " + ContentFragment.a(this.rdv.rdr).rdz.getChildCount());
            int i = 0;
            while (true) {
                int i2 = i;
                if (i2 >= ContentFragment.a(this.rdv.rdr).rdz.getChildCount()) {
                    break;
                }
                Object tag = ContentFragment.a(this.rdv.rdr).rdz.getChildAt(i2).getTag();
                if (tag instanceof h) {
                    ((h) tag).coZ();
                }
                i = i2 + 1;
            }
            ContentFragment.a(this.rdv.rdr).rdz.removeAllViews();
            ContentFragment.a(this.rdv.rdr).rdz.setVisibility(8);
        }
        AppMethodBeat.o(37624);
        return true;
    }
}
