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

60 lines
2.3 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;
2021-07-19 11:38:20 +00:00
import android.widget.ImageView;
2021-06-27 20:44:35 +00:00
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);
2021-07-19 11:38:20 +00:00
int i = 2131365421;
ImageView imageView = (ImageView) findViewById(2131365421);
if (imageView != null) {
i = 2131365422;
StatusView statusView = (StatusView) findViewById(2131365422);
if (statusView != null) {
i = 2131365423;
TextView textView = (TextView) findViewById(2131365423);
if (textView != null) {
i = 2131365424;
TextView textView2 = (TextView) findViewById(2131365424);
if (textView2 != null) {
p3 p3Var = new p3(this, imageView, statusView, textView, textView2);
m.checkNotNullExpressionValue(p3Var, "ViewToolbarTitleBinding.…ater.from(context), this)");
this.i = p3Var;
return;
}
2021-06-27 20:44:35 +00:00
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i)));
}
public final TextView getTitle() {
2021-07-19 11:38:20 +00:00
TextView textView = this.i.d;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(textView, "binding.toolbarTitle");
return textView;
}
public final void setSubtitle(CharSequence charSequence) {
2021-07-19 11:38:20 +00:00
TextView textView = this.i.e;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(textView, "binding.toolbarTitleSubtext");
ViewExtensions.setTextAndVisibilityBy(textView, charSequence);
}
public final void setTitleColor(@ColorInt int i) {
2021-07-19 11:38:20 +00:00
this.i.d.setTextColor(i);
2021-06-27 20:44:35 +00:00
}
}