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

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.scanner.a.a.a;
import com.tencent.mm.ui.base.preference.Preference;
import java.util.List;

public final class h extends Preference {
    private Context mContext = null;
    private View mView = null;
    List<a> pil = null;

    public h(Context context) {
        super(context);
        AppMethodBeat.i(81069);
        this.mContext = context;
        setLayoutResource(2130970385);
        AppMethodBeat.o(81069);
    }

    public final View getView(View view, ViewGroup viewGroup) {
        AppMethodBeat.i(81070);
        if (this.mView == null) {
            this.mView = onCreateView(viewGroup);
        }
        onBindView(this.mView);
        View view2 = this.mView;
        AppMethodBeat.o(81070);
        return view2;
    }

    public final void onBindView(View view) {
        AppMethodBeat.i(81071);
        super.onBindView(view);
        GridView gridView = (GridView) this.mView.findViewById(2131826579);
        b bVar = new b(this);
        gridView.setAdapter(bVar);
        if (this.pil != null) {
            bVar.setItemList(this.pil);
        }
        AppMethodBeat.o(81071);
    }
}
