discord-jadx/app/src/main/java/com/discord/views/ToolbarTitleLayout.java

55 lines
2.1 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.views;
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.TextView;
import androidx.annotation.ColorInt;
import androidx.constraintlayout.widget.ConstraintLayout;
2021-07-13 20:23:20 +00:00
import c.a.i.p3;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.view.extensions.ViewExtensions;
import d0.z.d.m;
/* compiled from: ToolbarTitleLayout.kt */
public final class ToolbarTitleLayout extends ConstraintLayout {
2021-07-13 20:23:20 +00:00
public final p3 i;
2021-06-27 20:44:35 +00:00
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ToolbarTitleLayout(Context context) {
super(context);
m.checkNotNullParameter(context, "context");
2021-07-13 20:23:20 +00:00
LayoutInflater.from(getContext()).inflate(2131558827, this);
int i = 2131365409;
StatusView statusView = (StatusView) findViewById(2131365409);
2021-06-27 20:44:35 +00:00
if (statusView != null) {
2021-07-13 20:23:20 +00:00
i = 2131365410;
TextView textView = (TextView) findViewById(2131365410);
2021-06-27 20:44:35 +00:00
if (textView != null) {
2021-07-13 20:23:20 +00:00
i = 2131365411;
TextView textView2 = (TextView) findViewById(2131365411);
2021-06-27 20:44:35 +00:00
if (textView2 != null) {
2021-07-13 20:23:20 +00:00
p3 p3Var = new p3(this, statusView, textView, textView2);
m.checkNotNullExpressionValue(p3Var, "ViewToolbarTitleBinding.…ater.from(context), this)");
this.i = p3Var;
2021-06-27 20:44:35 +00:00
return;
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i)));
}
public final TextView getTitle() {
2021-07-13 20:23:20 +00:00
TextView textView = this.i.f143c;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(textView, "binding.toolbarTitle");
return textView;
}
public final void setSubtitle(CharSequence charSequence) {
TextView textView = this.i.d;
m.checkNotNullExpressionValue(textView, "binding.toolbarTitleSubtext");
ViewExtensions.setTextAndVisibilityBy(textView, charSequence);
}
public final void setTitleColor(@ColorInt int i) {
2021-07-13 20:23:20 +00:00
this.i.f143c.setTextColor(i);
2021-06-27 20:44:35 +00:00
}
}