package com.bytedance.android.livesdk.settings.customtab;

import X.08s;
import X.0b0;
import X.0dA;
import X.1MZ;
import X.1jk;
import X.2sP;
import X.2sR;
import X.C0359Fcv;
import X.C1781GFy;
import X.FdN;
import X.FdS;
import X.M12;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bytedance.android.livesdk.ui.BaseFragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.h.b.n;

public final class KevaDebugFragment extends BaseFragment {
    public FdN LIZ;
    public List<? extends 2sR<?>> LIZIZ;
    public RecyclerView LIZJ;
    public 1MZ LIZLLL;
    public HashMap LJ;

    static {
        Covode.recordClassIndex(20746);
    }

    public final /* synthetic */ void onDestroyView() {
        super.onDestroyView();
        HashMap hashMap = this.LJ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public KevaDebugFragment() {
        ArrayList arrayList = new ArrayList();
        Class<C1781GFy> cls = C1781GFy.class;
        for (Field field : cls.getDeclaredFields()) {
            n.LIZIZ(field, "");
            field.setAccessible(true);
            Object obj = field.get(cls);
            if (obj instanceof 2sR) {
                2sP r3 = (2sP) obj;
                arrayList.add(new 2sR(r3.LIZJ, r3.LIZ()));
            }
        }
        this.LIZIZ = arrayList;
    }

    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        super.onViewCreated(view, bundle);
        if (this.LIZLLL == null) {
            this.LIZLLL = view.findViewWithTag("search_view");
        }
        1MZ r1 = this.LIZLLL;
        if (r1 != null) {
            r1.addTextChangedListener(new C0359Fcv(this));
        }
        if (this.LIZJ == null) {
            this.LIZJ = view.findViewWithTag("recycler_view");
        }
        this.LIZ = new FdN(this.LIZIZ, new FdS(this));
        RecyclerView recyclerView = this.LIZJ;
        if (recyclerView != null) {
            getContext();
            recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
        }
        RecyclerView recyclerView2 = this.LIZJ;
        if (recyclerView2 != null) {
            recyclerView2.setAdapter(this.LIZ);
        }
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        RecyclerView recyclerView;
        MethodCollector.i(9138);
        M12.LIZ(layoutInflater);
        LinearLayout linearLayout = new LinearLayout(layoutInflater.getContext());
        linearLayout.setBackground(0b0.LIZJ(2131234294));
        linearLayout.setOrientation(1);
        linearLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
        1jk r8 = new 1jk(layoutInflater.getContext());
        08s.LIZ(r8, 2131886507);
        r8.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
        r8.setPadding(0b0.LIZ(16.0f), 0b0.LIZ(8.0f), 0b0.LIZ(16.0f), 0b0.LIZ(8.0f));
        r8.setText(0b0.LIZ(2131834205));
        r8.setBackgroundColor(Color.parseColor("#55112233"));
        r8.setTextColor(-1);
        linearLayout.addView(r8);
        1MZ r5 = new 1MZ(layoutInflater.getContext());
        this.LIZLLL = r5;
        08s.LIZ(r5, 2131886510);
        r5.setTag("search_view");
        r5.setLayoutParams(new LinearLayout.LayoutParams(-1, 0b0.LIZ(50.0f)));
        r5.setPadding(0b0.LIZ(16.0f), 0, 0b0.LIZ(16.0f), 0);
        r5.setMaxLines(1);
        r5.setGravity(16);
        r5.setHint("input search keywords");
        r5.setSingleLine();
        r5.setFocusable(true);
        r5.setFocusableInTouchMode(true);
        linearLayout.addView(this.LIZLLL);
        r5.setBackgroundColor(0dA.LIZ(r5, 2130971275));
        r5.setImeOptions(3);
        r5.requestFocus();
        RecyclerView recyclerView2 = new RecyclerView(layoutInflater.getContext());
        this.LIZJ = recyclerView2;
        recyclerView2.setTag("recycler_view");
        RecyclerView recyclerView3 = this.LIZJ;
        if (recyclerView3 != null) {
            recyclerView3.setScrollBarSize(0b0.LIZ(3.0f));
        }
        if (Build.VERSION.SDK_INT >= 29 && (recyclerView = this.LIZJ) != null) {
            recyclerView.setVerticalScrollbarThumbDrawable(new ColorDrawable(-7829368));
        }
        RecyclerView recyclerView4 = this.LIZJ;
        if (recyclerView4 != null) {
            recyclerView4.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
        }
        linearLayout.addView(this.LIZJ);
        MethodCollector.o(9138);
        return linearLayout;
    }
}
