package androidx.leanback.widget;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.leanback.widget.SearchOrbView;
import p037.p091.C2072;
import p037.p091.C2077;
import p037.p091.C2079;
import p037.p091.p095.AbstractC2189;

/* JADX INFO: loaded from: classes.dex */
public class TitleView extends FrameLayout {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public ImageView f883;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public TextView f884;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public SearchOrbView f885;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int f886;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public boolean f887;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final AbstractC2189 f888;

    /* JADX INFO: renamed from: androidx.leanback.widget.TitleView$֏, reason: contains not printable characters */
    public class C0138 extends AbstractC2189 {
        public C0138(TitleView titleView) {
        }
    }

    public TitleView(Context context) {
        this(context, null);
    }

    public TitleView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, C2072.browseTitleViewStyle);
    }

    public TitleView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.f886 = 6;
        this.f887 = false;
        this.f888 = new C0138(this);
        View viewInflate = LayoutInflater.from(context).inflate(C2079.lb_title_view, this);
        this.f883 = (ImageView) viewInflate.findViewById(C2077.title_badge);
        this.f884 = (TextView) viewInflate.findViewById(C2077.title_text);
        this.f885 = (SearchOrbView) viewInflate.findViewById(C2077.title_orb);
        setClipToPadding(false);
        setClipChildren(false);
    }

    public Drawable getBadgeDrawable() {
        return this.f883.getDrawable();
    }

    public SearchOrbView.C0136 getSearchAffordanceColors() {
        return this.f885.getOrbColors();
    }

    public View getSearchAffordanceView() {
        return this.f885;
    }

    public CharSequence getTitle() {
        return this.f884.getText();
    }

    public AbstractC2189 getTitleViewAdapter() {
        return this.f888;
    }

    public void setBadgeDrawable(Drawable drawable) {
        this.f883.setImageDrawable(drawable);
        m312();
    }

    public void setOnSearchClickedListener(View.OnClickListener onClickListener) {
        this.f887 = onClickListener != null;
        this.f885.setOnOrbClickedListener(onClickListener);
        this.f885.setVisibility((this.f887 && (this.f886 & 4) == 4) ? 0 : 4);
    }

    public void setSearchAffordanceColors(SearchOrbView.C0136 c0136) {
        this.f885.setOrbColors(c0136);
    }

    public void setTitle(CharSequence charSequence) {
        this.f884.setText(charSequence);
        m312();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m312() {
        if (this.f883.getDrawable() != null) {
            this.f883.setVisibility(0);
            this.f884.setVisibility(8);
        } else {
            this.f883.setVisibility(8);
            this.f884.setVisibility(0);
        }
    }
}
